diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2021-11-18 20:46:55 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2021-11-18 20:46:55 +0200 |
| commit | 1ab85d33b4ba4c2b9a8fd7cee08ffb75dbce80c3 (patch) | |
| tree | 1feb4cfba16f76e58a49df449a8a48298f87805d /samples | |
| parent | 7d270b1bfad7880fb30ec1d4a3c492cf4e3e9d0b (diff) | |
Add some runtime handling
Diffstat (limited to 'samples')
| -rw-r--r-- | samples/sample1.code | 10 |
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 |
