tock-mirror/testcases/array-constructor.occ
Adam Sampson 1fb6adb005 Fix array constructors in occam.
This works at least for simple examples, although it's probably a bit
restrictive on the array indexes you're allowed; it should attempt to
constant-fold them.
2008-03-17 18:34:23 +00:00

8 lines
182 B
Plaintext

PROC P ()
VAL []INT array IS [1, 2, 3, 4]:
VAL []INT zeros IS [i = 0 FOR 20 | 0]:
VAL []INT nums IS [i = 0 FOR 20 | i]:
VAL []INT squares IS [i = 0 FOR 20 | i * i]:
SKIP
: