Thread: One line power
View Single Post
  #3   Spotlight this post!  
Unread 04-03-2002, 16:02
Manoel's Avatar
Manoel Manoel is offline
Registered User
FRC #0383 (Brazilian Machine)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Porto Alegre, RS, Brazil
Posts: 608
Manoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond repute
Send a message via ICQ to Manoel Send a message via MSN to Manoel
I posted something about this subject a while ago and got no response. I'm a big fan of one line code instead of if statements, just like you. Not only it looks nicer, it's a very strong intellectual exercise. However, my doubt is: Which one is really better? One line code obviously takes less RAM space, but which is faster? Is there any other aspect to be considered?

(Our code contains only two if statements, one of them being on the 'DO NOT CHANGE' part of the code. Looks great, works great, and I'm willing to post/e-mail the code to anyone interested. )
__________________
Manoel Flores da Cunha
Mentor
Brazilian Machine
Team # 383