There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Am I alone in finding Perl's precedence table counter-intuitive in having exponentiation bind more tightly than unary negation?
I (and the mathematicians I know) think that: -2**2 = 4, not -4 as Perl insists. Does anyone know if this is a special feature of Perl or if other languages do the same? Edited: ~Tue Jan 14 20:37:54 2003 (GMT) by footpad: Moved to SOPW, per Consideration In reply to Operator Precedence (unary negation and exponentiation) by Elliott
|
|