[Newbies] ifTrue ifFalse help

calcrisk33 rick.m.wallace at gmail.com
Wed Apr 27 06:05:28 UTC 2011


Given:

| binnum index bool|
binnum := 'abc'.
index := 1.
bool:=(binnum at: index).
(bool = 'a')
	ifTrue: [Transcript show: 'ifTrue'; cr]
	ifFalse: [Transcript show: 'ifFalse'; cr].
Transcript show: bool; cr.

Why does this result in:

ifFalse
a

and not

ifTrue
a

I've tried both = and == with no success.

Any help is much appreciated!

--
View this message in context: http://forum.world.st/ifTrue-ifFalse-help-tp3477318p3477318.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.


More information about the Beginners mailing list