aboutsummaryrefslogtreecommitdiffstats
path: root/samples/sample1.code
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2021-11-18 20:46:55 +0200
committerJan Tuomi <jans.tuomi@gmail.com>2021-11-18 20:46:55 +0200
commit1ab85d33b4ba4c2b9a8fd7cee08ffb75dbce80c3 (patch)
tree1feb4cfba16f76e58a49df449a8a48298f87805d /samples/sample1.code
parent7d270b1bfad7880fb30ec1d4a3c492cf4e3e9d0b (diff)
Add some runtime handling
Diffstat (limited to 'samples/sample1.code')
-rw-r--r--samples/sample1.code10
1 files changed, 6 insertions, 4 deletions
diff --git a/samples/sample1.code b/samples/sample1.code
index 337bd6d..dff751f 100644
--- a/samples/sample1.code
+++ b/samples/sample1.code
@@ -1,8 +1,10 @@
foo = "foo";
-bar = "bar";
+number-of-the-beast = 666;
+my-number = number-of-the-beast; # value lookup
+num = int.zero; # builtin value
int.double = int.multiply 2;
list.multiply-all = reduce int.multiply 1;
-ifelse (string.eq? foo bar)
- (int.double 1) # if foo = bar, calc 1 * 2
- (int.double 2) # else, calc 2 * 2
+ifelse (string.eq? foo "bar")
+ (int.double 1) # if foo = "bar", calc 1 * 2
+ number-of-the-beast # else, number of the beast