Topic : C-Language Documentation Author : John Kormylo Version : C.HYP 1.0 Subject : Documentation/C-Language Nodes : 233 Index Size : 6362 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : en @default : @help : Help @options : +g -i -s +x +z -t4 @width : 75 View Ref-File[ if / else ] Syntax: if( <test> ) { <code> } or if( <test> ) <statement>; else { <code> } or else <statement>; where <test> is a logical expression, <code> is one or more lines of executable C code, and <statement> is a single statement. The 'else' statement is optional, but must follow the 'if' block immediately when used. Note: Since 0 is FALSE and anything else is TRUE, it is common to use 'if(value)' in place of 'if(value != 0)' or use 'if(!value)' instead of 'if(value == 0)' where 'value' can be almost any data type expression. See also switch and Logical Operators.