summaryrefslogtreecommitdiff
path: root/tnslc/simple.tnsl
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2023-03-23 01:03:28 -0400
committerKyle Gunger <kgunger12@gmail.com>2023-03-23 01:03:28 -0400
commit9066d5215225a32865cb628dad1c69997efffe62 (patch)
tree9a14a6445d0fd22013f944957ce41be9cd3c5f6d /tnslc/simple.tnsl
parent4611b333202bb548d0566e31cf97733deeeca158 (diff)
Simple if and loop statements
Diffstat (limited to 'tnslc/simple.tnsl')
-rw-r--r--tnslc/simple.tnsl13
1 files changed, 8 insertions, 5 deletions
diff --git a/tnslc/simple.tnsl b/tnslc/simple.tnsl
index 4b34340..1d9bd30 100644
--- a/tnslc/simple.tnsl
+++ b/tnslc/simple.tnsl
@@ -20,10 +20,13 @@ mod.test sv = {
}
/; main [int]
- ~int j = ~sv.i
- int i = mod.arr_i{j` - 1}
- /; if (1 == 1)
- return i
+ ~uint8 i = ~mod.str{0}
+ bool b = i` > i`
+ /; loop (i` < 81)
+ i` = i` + 2
+ /; if (i` == 80)
+ i` = i` + 5
+ ;/
;/
- return 0
+ return i`
;/