summaryrefslogtreecommitdiff
path: root/examples/variables.fy
blob: ac619c9a797e142f0b34565cc1d26e355b775a21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#*
 * Examples of how to define variables
 *#

# Defines the variables 
my foo = 1 + 1;
my bar = 4 - 1, baz = 100 + 1, bay;

# bay has been initialized with the default value of 0
say bay;

# Prints out "5\n"
assert 5 == (say foo + bar);

# Pritns out "51101\n"
assert 51 == (put baz - 50);
assert 101 == (say baz);

# Change the value of the variable to 99 and print it out
assert 99 == (baz = 99);
say baz;