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

9 lines
122 B
Smalltalk
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
|i|
i := 1.
[:exit |
Transcript showCR:i.
i == 5 ifTrue:[ exit value:'stopped' ].
i := i + 1.
] loopWithExit