Conditional and Looping: if

Use if to implement a conditional statement.

syntax:

(if (conditional expression)
    code block 1
)

Optionally...

(else
    code block 2
)

If conditional expression evaluates to be true (non zero), code block 1 is executed, otherwise it is skipped. If an else is appended to the if statement and conditional expression evaluates to be false (zero), code block 2 is executed.

Examples of using the if statement
(if(HaveMouse())
  DrawStatus("Mouse is available!")
)(
else
  DrawStatus("Mouse is NOT available!")
)

(if (SomeVar or (SomeOtherVar and not AnotherVar))
  // do something
)