summaryrefslogtreecommitdiff
path: root/examples/inlinefunctions.fy
blob: 81848ceef761a51ba4931dc02f38dc8c393a56fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#*
 * Simple builtin function tests
 *#

# Print "-20\n"
assert (neg 20) == (say neg 20);

# Print "30\n"
assert 30 == (say 10 - neg 20);

# Print "-30\n"
assert (neg 30) == (say neg neg neg 10 - neg 20);

# Print "Hello\n"
put "Hello";
ln;

# Exit with exit code 0
exit 10 + 10 - 5 - 15;