View Single Post
Old Jan 24th, 2005, 7:34 PM   #3
Lance
Programmer
 
Lance's Avatar
 
Join Date: Oct 2004
Location: Chicago, IL USA
Posts: 74
Rep Power: 4 Lance is on a distinguished road
Send a message via AIM to Lance
Even better are ones without those unsightly curly brackets:

<statement> if <expression>;

Such as this useful one:

print "foo = $foo\n" if $DEBUG;

So then you can just define $DEBUG as 1 and easily use it to print out debug-only messages. Although, it's all quite surprising it doesn't work like in C:

if (<expression>) <statement>;

I find the C way the easiest, because if you need to add more statements later, simply add curly brackets. But noooo, Larry Wall has to go and make things backwards! Oh well, it's still readable...
__________________
/* LANCE */
C++;  /* this makes C bigger but returns the old value */
char *site = "slackwise.net",
     *home = "lance.slackwise.net",
     *pics = "flickr.com/photos/slackwise";
Lance is offline   Reply With Quote