Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!Dortmund.Germany.EU.net!Germany.EU.net!howland.reston.ans.net!gatech!europa.chnt.gtegsc.com!uhog.mit.edu!bloom-beacon.mit.edu!spool.mu.edu!news.cs.indiana.edu!shulick@cherry.ucs.indiana.edu
From: "Sam Hulick" <shulick@cherry.ucs.indiana.edu>
Subject: Inform: && and || precedence
Message-ID: <1995Aug20.010724.24070@news.cs.indiana.edu>
Organization: Vallen Software
Date: Sun, 20 Aug 1995 01:07:18 -0500
Lines: 21


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
