Anvil | Smiths Smiths | Register Register | Login Login |
Search:
Show links Show tools Show tree | Previous document Next document | njet.org > Anvil > Documentation > Language reference > Statements > Compound statements > If

If

If statement allows conditional execution of statement or conditional choice of two statements, executing one or the other but not both.

Given condition expression is evaluated and if it yields to "true" then the 'then' statement is evaluated, otherwise if ``else´´ part exists then 'else' statement is executed. If there are no ``else´´ part and expression evaluates "false" no further actions are taken.

  if := "if" "(" expr-startcondition ")" statementthen [ "else" statementelse ] 
Contributes notes:
Add a note
What's new | Anvil