RosettaCodeData/Task/Loops-Nested/Smalltalk/loops-nested-1.st

9 lines
122 B
Smalltalk
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
|i|
i := 1.
[:exit |
Transcript showCR:i.
i == 5 ifTrue:[ exit value:'stopped' ].
i := i + 1.
] loopWithExit