[ENH] doWhile-control-structures-jf

julian at beta4.com julian at beta4.com
Thu Sep 4 00:07:28 UTC 2003


from preamble:

"Change Set:		doWhile-control-structures-jf
Date:			3 September 2003
Author:			Julian Fitzell

Add #doWhileTrue: and #doWhileFalse: to BlockContext.

They evaluate the receiver once, and then continue to do so every time
the condition block passed in is true or false (respectively).  This is
similar to the do...while control structure in many other languages.

These methods are much more intention revealing than having to use
#whileTrue or #whileFalse and combining your loop block and your
condition block into one.  Also, this way you can get the return value
of the last loop block iteration."!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doWhile-control-structures-jf.cs.gz
Type: application/octet-stream
Size: 581 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030903/757d0051/doWhile-control-structures-jf.cs.obj


More information about the Squeak-dev mailing list