[Prev][Next][Index][Thread]

# Unusual comparison behaviors

- Date: Tue, 20 Feb 1996 20:19:41 PST
- From:
- Content-Transfer-Encoding: quoted-printable
- Content-Type: text/plain; charset="us-ascii"

    I know this has always been the way the server works, and its too bad I didn't think about it before the finalizing of the server, because every so often this one bites me, as it just did a moment ago, but...

    I have a property defaulted to 0 which will be changed to an object #, and I try this:

    if (prop && prop:isa($player))

    this doesn't work, why?  read on:

    These formulae produce these results:

     1 && #1   -->  #1
     0 && #1   -->  0

     #1 && 1   -->  #1
     #1 && 0   -->  #1   (shouldn't this be 0?)

    so since:

     2 && 1 && 3  returns 3 (always the last element)

    why does
     2 && #1 && 3  return #1  (the first occurrance of an OBJ)
    instead of 3?
    At this point it doesn't matter anything that comes after the #1, even
     2 && #1 && 0 returns #1, instead of 0 like (I think) it should.

    It doesn't seem to matter what the math is after a type OBJ data is used in a comparison, it always returns true with that value at that point.

    --
    chaeon@roc.clawpaw.com  -- Site admin for clawpaw.com     http://www.clawpaw.com
    Chaeon - Site Wiz or K'ryn - Bronze rider,  VirtuaPern Moo   http://www.clawpaw.com/VirtuaPern
    VirtuaPern MOO - telnet dragon.clawpaw.com port 9999

- Prev: To Heck with ethics! (was Re: The concept of "wizardly ethics")
- Next: Re: Unusual comparison behaviors
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index