aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runnable/const_section.elna
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-10-09 23:35:03 +0200
committerEugen Wissner <belka@caraus.de>2026-10-09 23:35:03 +0200
commitda1e84e33de1a9c2cc1745b8f42bc7f0cee8fc5c (patch)
tree6222ecd61c9d6e9d59c6169b99e4a24a5d347fea /testsuite/runnable/const_section.elna
parent134d3ac4caff6d87c79b0892e57073594cb0064c (diff)
downloadelna-da1e84e33de1a9c2cc1745b8f42bc7f0cee8fc5c.tar.gz
Add const sections
Diffstat (limited to 'testsuite/runnable/const_section.elna')
-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.