[squeak-dev] comparison in a variable

Bob Arning arning315 at comcast.net
Wed Nov 7 18:21:42 UTC 2012


test := [ :x :y |  x > y ].

test value: 5 value: 7 ==> false

or

test := #>

5 perform: test with: 7

Cheers,
Bob

On 11/7/12 1:02 PM, Joseph J Alotta wrote:
> Greetings,
>
> I am trying to store a test condition in a variable:
>
> | test |
>
> test := '>'.
>
> ( 5 test 7)  ==> false
>
>
> I tried:
>
> test := $>.
>
> test := [ :x :y |  x > y ].
>
>
> How is this done?
>
>
> Thank you for your help.
>
>
> Sincerely,
>
> Joe.
>
>
>
>



More information about the Squeak-dev mailing list