From: nobu.nokada@... Date: 2003-09-04T00:27:05+09:00 Subject: Re: Possible to make compound if statements... Hi, At Thu, 4 Sep 2003 00:12:46 +0900, Hal Fulton wrote: > In case a newbie gets confused: He does mean = here, not ==. > An assignment returns the value assigned. Maybe. > > Also note that 'and' and 'or' have same precedence. > > > > (foo or bar and bas) means ((foo || bar) && bas) > > but > > (foo || bar && bas) is (foo || (bar && bas)) > > This confuses me. So && is higher precedence than || > but 'and' is not higher than 'or'. > > In short: > true or true and false # false > true || true && false # true > > For more reasons than readability, I think these > should certainly not be mixed: > if a and b || c or d && e || f and g... > > :) Agreed. One possibility is that it is same as Bourne-shell's && and ||. Perhaps it comes via Perl, but I don't know the certain reason. -- Nobu Nakada