Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
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: 4 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
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:25 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC