aboutsummaryrefslogtreecommitdiffstats
path: root/test3
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2018-03-21 12:29:09 -0400
committerClyne Sullivan <tullivan99@gmail.com>2018-03-21 12:29:09 -0400
commit140a0bbecc144e554c1954f594a9f0d0b2276e9c (patch)
treef2c4d0223b8659e259d5efa0a98f99a4a54264aa /test3
parent28447df15ac80d7dad1f4889d3d61fe7bfe42a12 (diff)
interpreter overhaul, should be better
Diffstat (limited to 'test3')
-rw-r--r--test325
1 files changed, 25 insertions, 0 deletions
diff --git a/test3 b/test3
new file mode 100644
index 0000000..940ed6f
--- /dev/null
+++ b/test3
@@ -0,0 +1,25 @@
+# test3
+# verify builtin functions, conditionals and such
+
+a = 5
+
+func(checka) {
+ if (a == 5) {
+ print("a == 5")
+ } else {
+ print("a != 5")
+ }
+}
+
+checka
+
+print("Increment a...")
+a = a + 1
+checka
+
+d = 0
+while (d < 10) {
+ print(d)
+ d = d + 1
+}
+