aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runnable
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/runnable')
-rw-r--r--testsuite/runnable/const_section.elna16
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/runnable/const_section.elna b/testsuite/runnable/const_section.elna
new file mode 100644
index 0000000..a4fde8f
--- /dev/null
+++ b/testsuite/runnable/const_section.elna
@@ -0,0 +1,16 @@
+program()
+const
+ BUFFER_SIZE = 3
+var
+ arr: [BUFFER_SIZE]Int
+begin
+ arr[1] := 10;
+ arr[BUFFER_SIZE] := 30;
+ assert(arr[1] = 10);
+ assert(arr[3] = 30);
+ block my_block
+ const LOCAL_VAL = 42
+ begin
+ assert(LOCAL_VAL = 42)
+ end
+end.