From 1ab85d33b4ba4c2b9a8fd7cee08ffb75dbce80c3 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Thu, 18 Nov 2021 20:46:55 +0200 Subject: Add some runtime handling --- samples/sample1.code | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'samples') 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 -- cgit v1.3