April 17, 2012
10:56 p.m.
If I understand what I have read from the blue book the following is how a block with a return is handled: 1 - sampleMethod 2 self doIt: [ ^ true ].3 Transcript show: 'here'; cr. Line 1 defines the instance method 'sampleMethod' - using Redline syntax of course. Line 2 sends the keyword message doIt: to receiver with a block that contains a '^' (return). Line 3 outputs a message using the Transcript. When Line 2 is executed and the passed block is sent the message 'value' then the value true is returned from the method 'sampleMethod', and line 3 of sampleMethod is never executed. Correct? Rgs, James.