34 lines
577 B
Plaintext
34 lines
577 B
Plaintext
-- This file tests simple array uses without replication
|
|
-- Four unknown variables are available; x, y, z.
|
|
-- Two arrays are automatically declared; a (size 10) and b (size 12)
|
|
|
|
PROC p(INT x, y, z)
|
|
[10]INT a:
|
|
[12]INT b:
|
|
%%
|
|
:
|
|
|
|
PROC m()
|
|
SKIP
|
|
:
|
|
|
|
%FAIL same items in SEQ replicator
|
|
SEQ i = 0 FOR 6
|
|
PAR
|
|
a[i] := 3
|
|
a[i] := 4
|
|
|
|
%FAIL Modulo items in SEQ replicator (unsafe)
|
|
SEQ i = 0 FOR 6
|
|
PAR
|
|
a[(i + 1) REM 6] := 3
|
|
a[0] := 4
|
|
|
|
%PASS Modulo items in SEQ replicator (safe)
|
|
SEQ i = 0 FOR 6
|
|
PAR
|
|
a[(i + 1) REM 7] := 3
|
|
a[0] := 4
|
|
|
|
%
|