This can't be right....

tblanchard at mac.com tblanchard at mac.com
Fri Jun 27 07:26:04 UTC 2003


try ok := false. "lower case"

False is a class, false is the instance.

On Friday, June 27, 2003, at 01:07  AM, Rick McGeer wrote:

> I'd like to write some Smalltalk code equivalent to the Java fragment:
>
> boolean ok = false;
> while (!ok) {
>     ...
>     ok = <condition>;
> }
>
> So I try:
>
> ok _ False.
> [ok] whileFalse: [.... ok _ <condition>.]
>
> which fails.  On the other hand:
>
> ok _ 0.
> [ok > 0] whileFalse: [....  ok _ (<condition>) ifTrue:[1] ifFalse:[0]]
>
> which works just fine.  This is perverse; shouldn't the two fragments 
> have identical functionality?
>
> I'm using the 3.4 image.
>
>
> --
>
> Personal Signature
>
>
<image.tiff>
>
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 819 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030627/ca877495/attachment.bin


More information about the Squeak-dev mailing list