-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.loaf
41 lines (29 loc) · 958 Bytes
/
test.loaf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
bake main () {
^^ a string non-mutable variable
bagel hello = "bread";
^^ a mutable variable
bread hey = "there";`
^^ a non-mutable boolean variable
burger nice = true;
^^ a mutable boolean variable
pizza notTasty = false;
^^ a non-mutable integer/float variable
cookie integer = 123;
^^ a mutable integer/float variable
donut float = 123.5;
^^ print something to the console
^^ to use variables use back ticks
^^ for example:
sprinkle(`float`);
^^ to print something without using variables, use double quotes
^^ for example:
breadcast("hello, bread");
^^ add two numbers (supports only two for now).
breadition(1, 2);
^^ subtract two numbers (supports only two for now).
breadtraction(2, 1);
^^ multiply 2 numbers (supports only two for now).
breadplication(1, 2);
^^ divide 2 numbers (supports only two for now).
breadivision(2, 1)
};