Cold Help System: Programming: ColdC Reference Manual: Language Structure: Statements: Conditional: if


The if statement is used to selectively execute code. It will only execute the code if the condition expression evaluates true. It has the following syntax:

if (condition expression)
statement

When the interpreter encounters the if statement it will first evaluate the condition expression. If the value of the condition expression is true then it will evaluate the statement. If it is not true it will skip the statement. The compound statement can be used to group multiple statements.


if | if-else | switch


the Cold Dark