Inform: && and || precedence


Sun, 20 Aug 1995 01:07:18 -0500

I don't see it mentioned in the manual, but.. does and/or precedence
work the same in Inform as it does in C? (&& takes precedence over ||)

So in this statement..

if (blah has open && children(blah) ~=0 || blah in player) .....

If what we mean is, "If blah is open, AND, it has no kids or it's in the
player".. then we need:

if (blah has open && (children(blah) ~= 0 || blah in player)) .....

So basically... does && take precedence over ||, or are these statements
executed in a simple left->right order?

-- 
--- Sam Hulick ------------- shulick@indiana.edu ---------------------
Systems Consultant        | Homepage:
Indiana College Placement |    http://copper.ucs.indiana.edu/~shulick/
  and Assessment Center   | PGP public key available on request