RosettaCodeData/Task/Stack/Sather/stack-2.sa

15 lines
250 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
class MAIN is
main is
s ::= #STACK{INT};
#OUT + "push values...\n";
s.push(3);
s.push(2);
s.push(1);
s.push(0);
#OUT + "retrieving them...\n";
loop
#OUT + s.pop + "\n";
until!(s.is_empty); end;
end;
end;