From bb4f474cb2247e0e314beab5d7d72e673ff4e8b6 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 24 Jul 2026 03:11:32 +0200 Subject: Implement a repeat loop --- testsuite/runnable/for_with.elna | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 testsuite/runnable/for_with.elna (limited to 'testsuite/runnable/for_with.elna') diff --git a/testsuite/runnable/for_with.elna b/testsuite/runnable/for_with.elna new file mode 100644 index 0000000..cfec5c0 --- /dev/null +++ b/testsuite/runnable/for_with.elna @@ -0,0 +1,9 @@ +var + actual: [3]Word := [3]Word{} + +begin + for element of [3]Word{ 1u, 2u, 3u } with i do + actual[i] := i * element^ + end; + assert(actual = [3]Word{ 1u, 4u, 9u }) +end. -- cgit v1.2.3