Thread: formatting
View Single Post
Old 04-02-2003, 07:13 AM   #30 (permalink)
Travis Dane
Code Monkey
 
Travis Dane's Avatar
 
Join Date: Feb 2003
Location: Netherlands
Posts: 89
Travis Dane is on a distinguished road
Send a message via ICQ to Travis Dane
Quote:
Originally posted by jeffro
This may just be me but I only use brackets when I have more than one command or statement in an if block. Travis' style is correct but, if there are only 2 outcomes for the if block (true|false). If that is the case, why not just use this style?
Ternary Operators are used to give variable a value, It returns
a certain value, You can't really use it to execute, For example
functions.

Epsilon, Your alternative is good but you can get problems when
you have to for example excute a long function and have an else
in it, Becomes fairly long then.
__________________
OpenGL, DirectX
Travis Dane is offline   Reply With Quote