Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Logical expression style

by Abigail-II (Bishop)
on Jul 12, 2002 at 15:57 UTC ( #181322=note: print w/replies, xml ) Need Help??


in reply to Logical expression style

I mostly use the "operator goes at the end" style, although I do sometimes make an exception for or die. As a condition for an if or while, I always put the operator at the end, unless it wouldn't fit the line, and there's other decent way of breaking the line (my number 1 rule for formatting code is "a line shall never exceed 80 characters").

It is important though that operators that are on the same "level" are lined up vertically. (I'm a big fan of lining up similar things in columns).

Abigail

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://181322]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2022-08-08 20:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?