Anonymous user
Category:Smalltalk: Difference between revisions
→Control Structures
Line 480:
(knowing that the "ifXX"-methods send <tt>"value"</tt> to the corresponding arg and return that)
In this style, all of Smalltalk's control structures, loops, enumeration, stream readers and event-
The following is only a tiny subset - there are virtually hundreds or thousands of uses of blocks for control structures in the system.
Line 492:
[ loop code . condition expression ] whileTrue.
[ loop code ] doWhile:[ condition ].
[ loop code ] doUntil:[ condition ].
n timesRepeat:[ block to be looped over ] "n being an integer"
|