summaryrefslogtreecommitdiff
path: root/tnslc/simple.tnsl
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2023-03-19 14:23:33 -0400
committerKyle Gunger <kgunger12@gmail.com>2023-03-19 14:23:33 -0400
commit7cd4f39bee59daad7160fc484541bb7062d660b4 (patch)
treed7f2a9a4424bb909160b7815f35783697fd1709f /tnslc/simple.tnsl
parent06dfc4e0bf7dbf2edeae463603c8b048c0cc5065 (diff)
Array fixes
Diffstat (limited to 'tnslc/simple.tnsl')
-rw-r--r--tnslc/simple.tnsl10
1 files changed, 8 insertions, 2 deletions
diff --git a/tnslc/simple.tnsl b/tnslc/simple.tnsl
index 4d727ac..dda4fb0 100644
--- a/tnslc/simple.tnsl
+++ b/tnslc/simple.tnsl
@@ -2,6 +2,7 @@
/; module mod
uint a = 2, b = 4
{}uint8 str = "Hello", c = "#"
+ {}int arr_i = {2, 3, 4, 5}
struct test {
int i, j,
@@ -14,7 +15,12 @@ mod.test tv = {
1, 2, false, 0
}
+mod.test sv = {
+ 4, 5, true, 6
+}
+
/; main [int]
- ~int i = ~tv.i
- return i`
+ ~int j = ~sv.i
+ int i = mod.arr_i{j` - 1}
+ return i
;/