-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemoCode.txt
61 lines (44 loc) · 1.08 KB
/
demoCode.txt
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
"""
My Custom Class
"""
class Foo = {
define self.public = 5
define Foo.static = 5.6
"""
Constructor
"""
action self.create() = {
}
action self.somePublicAction(define someParameter, define param as Number = 2) = {
print(self + " Called for " + someParameter + " and " param)
}
action Foo.someStaticFunction() = {
print(Foo.documentation)
}
define self.a = Object.create() new Object()
define self.a.b = 4
}
define someVar as Decimal = 3
action someRandomAction() = {
}
"""
doTwiceIf (3 > 5) {
print(i)
}
"""
condition doTwiceIf = (define condition as Characters, define body) {
if (run(condition)) {
runWith(body, "define i = 1")
runWith(body, "define i = 2")
}
}
condition repeat(define iterationCounter, define body as Characters) = {
define times = run(iterationCounter).toNumber()
while(times > 0) {
run(body)
times = times - 1
}
}
for (define x from 0 to -100 jump 10) print(x)
while (true != false) print({define z = 3, z})
print((5 + (3 - 2)) * 5^2 + 3 * 4 / 4 + 4! + 8 + -2)