NLI: Function: if

Background: NLI, Expressions, Functions
Related: Examples

Description:
The if function executes expressions based on a condition. If the condition evaluates to anything, then the first expression is executed, else the second expression is executed. The second expression is optional.

General Format:
(if condExpr thenExpr [elseExpr])

Examples:
(; If john likes mary, then mary likes john)
(if (get john like mary)
    (set mary like john)
)

(; If john is a doctor, then set him to like golf and hate cartoons)
(if (get doctor instance john)
    (block
        (set john like golf)
        (set john hate cartoons)
    )
)

Notes:
The creation of rolex replica the watch is inspired by the retro and elegant money of rolex replica watches the brand's round watch. The chronograph is omega replica simple and stylish, with the line features of rolex replica uk the watch series.

CM ©2000-2007