RosettaCodeData/Task/Multiple-distinct-objects/XPL0/multiple-distinct-objects.xpl0
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

7 lines
328 B
Text

code Reserve=3, IntIn=10;
char A; int N, I;
[N:= IntIn(8); \get number of items from command line
A:= Reserve(N); \create array of N bytes
for I:= 0 to N-1 do A(I):= I*3; \initialize items with different values
for I:= 0 to N-1 do A:= I*3; \error: "references to the same mutable object"
]