This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
conditional_expression [2017/08/06 07:47] – justin | conditional_expression [2017/08/06 12:45] – justin | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- | ---- | ||
- | A **conditional expression** is an expression that evaluates to either true or false. | + | A **conditional expression** is an expression that evaluates to either true or false. |
+ | |||
+ | ^Operator^Expression evaluates to true when:^ | ||
+ | |==|Left operand is **equal to** the right operand.| | ||
+ | |!=|Left operand is **not equal to** the right operand.| | ||
+ | |<|Left operand is **less than** the right operand.| | ||
+ | |< =|Left operand is **less than or equal to** the right operand.| | ||
+ | |>|Left operand is **greater than** the right operand.| | ||
+ | |> =|Left operand is **greater than or equal to** the right operand.| | ||
+ | |contains|Left operand **contains one or more of** the right operand.| | ||
+ | |||
+ | ====Examples: | ||
+ | <code lua> | ||
+ | self.property[" | ||
+ | </ | ||
+ | <code lua> | ||
+ | global.property[" | ||
+ | </ | ||
+ | <code lua> | ||
+ | player.inventory contains "Gold Key" | ||
+ | </ | ||
- | ^Operator^Evaluates to true when:^ | ||
- | |==|Left operand is equal to the right operand| | ||
- | |!=|Left operand is not equal to the right operand| | ||
- | |<| | | ||
- | |< =| | | ||
- | |>| | | ||
- | |> =| | | ||
- | |contains| | |