RosettaCodeData/Task/Multiple-distinct-objects/Oz/multiple-distinct-objects-2.oz
2023-07-01 13:44:08 -04:00

7 lines
229 B
Text

declare
Arr = {Array.new 0 10 {OS.rand}} %% WRONG: contains ten times the same number
in
%% CORRECT: fill it with ten (probably) different numbers
for I in {Array.low Arr}..{Array.high Arr} do
Arr.I := {OS.rand}
end