Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: not 'another victim of precedence' ? 'It is true' : 'the code is false'

by periapt (Hermit)
on Apr 11, 2005 at 12:01 UTC ( #446573=note: print w/replies, xml ) Need Help??


in reply to not 'another victim of precedence' ? 'It is true' : 'the code is false'

That very think has burned me a couple of times also. That is why I surround the condition with parenthesis by default these days. Yeah, most of the time it isn't necessary but it doesn't hurt and the one or two times it is necessary, it has saved a lot of what is left of my thinning hair.

Nice writeup

PJ
use strict; use warnings; use diagnostics;
  • Comment on Re: not 'another victim of precedence' ? 'It is true' : 'the code is false'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://446573]
help
Chatterbox?
[james28909]: conversations like that make my pee pee go boom boom
[james28909]: :)

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2017-12-15 16:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (439 votes). Check out past polls.

    Notices?