RosettaCodeData/Task/Loops-Foreach/Sather/loops-foreach.sa

11 lines
249 B
Text
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
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;