Re: True/False statements with OBJECT variables

new topic     » goto parent     » topic index » view thread      » older message » newer message

At 04:20 PM 4/24/98 -0500, you wrote:

>if not compare(a,b) then
>    puts(1,"YAY! CORRECT!")
>else
>    puts(1,"BAD!")
>end if
>
>compare() returns zero for objects that "are" equal to one another,
>hence the need for the "not" in the comparison.

Until you get used to this "backward" stuff, you may find
it clearer to write:

  if compare(a,b) = 0 then -- think 'zero difference'
    puts(1,"Same!")
  else....

Irv
Spam Haiku:-------------------
Silent, former pig
One communal awareness
Myriad pink bricks
-------------------------------------

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu