View Single Post
Old Jan 24th, 2005, 3:36 PM   #1
G.I.Josh
Programmer
 
G.I.Josh's Avatar
 
Join Date: Aug 2004
Location: Eastern U.S
Posts: 51
Rep Power: 5 G.I.Josh is on a distinguished road
Send a message via AIM to G.I.Josh
1 line if code blocks; easier to read

This sounds a bit odd, but for realy short if code blocks, I actually find it easier to read. For example:

if ($class eq "Warrior") { @stats = (10, 15, 7, 9) }

is a bit easier for me to read then:

if ($class eq "Warrior") {
@stats = (10, 15, 7, 9)
}

Now, on longer if code, I certainly dont' find that the same is true. Anyway, am I the only one that thinks this. I've been finding it especially useful for when I have an if statement that's in an if statement. But I don't want to get in the habbit of doing that if the rest of the world can't read it.
__________________
http://exponentialab.blogspot.com/ - w00t, I've started a blog!
G.I.Josh is offline   Reply With Quote