RosettaCodeData/Task/Loops-Foreach/Sather/loops-foreach.sa
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

10 lines
249 B
Text

class MAIN is
main is
num:ARRAY{INT} := |1, 5, 4, 3, 10|;
loop
-- the iterator elt! behaves like a "foreach",
-- yielding the next element of the array at each iteration
#OUT + num.elt! + "\n";
end;
end;
end;