> Basic question on using '&&' vs 'and'.  I see that '&&' has higher
precedence
> than 'and', but why does
>
>  print 1 && 1 && 0;
>  print "\n";
>  print 1 and 1 and 0;
>  print "\n";
>
> return
>  0
>  1
>
> I would have expected both statements to return 0.

>From a couple of experiments, I would guess that "print" has higher
precedence than "and".

print 1 and print 0;

prints both in order, it doesn't "and" the 1 from printing 0 to the literal
1 to print 01 as you get with

print 1 && print 0;


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to