if / else if / else
- Purpose
- Executes conditional branches.
- Syntax
if <condition> then begin ... end else begin ... end- Example
if vehicle.id = 1 then begin print "first vehicle" to log end else begin print "other vehicle" to log end- Notes
- The AutoMod-style two-line form is also accepted: write if (condition) or else if (condition) and put begin on the next line. In conditions = is comparison.
- Related
- comparison operators, and, or, not