modding:function:or
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
modding:function:or [2017/01/26 00:13] – 0xabcdef | modding:function:or [2017/01/26 00:24] – 0xabcdef | ||
---|---|---|---|
Line 7: | Line 7: | ||
^ Syntax | (or exp1 [exp2 ... expn]) -> value/Nil | | ^ Syntax | (or exp1 [exp2 ... expn]) -> value/Nil | | ||
^ Arguments | exp1: An expression that evaluates to **Nil** or something else | | ^ Arguments | exp1: An expression that evaluates to **Nil** or something else | | ||
- | ^ | [exp2 ... expn] | Additional | + | ^ [exp2 ... expn] | Additional |
^ Category | [[logical operator functions|logical operator]] | | ^ Category | [[logical operator functions|logical operator]] | | ||
- | ^ Returns | The value of the first expression that does not return **Nil**, or **Nil** if there is none | | + | ^ Returns | The value of the first expression that does not return **Nil**, or **Nil** if there is none. If there is only one argument, returns the value of that argument. |
- | [[modding: | + | |
^ Description | Uses lazy evaluation, which means that it stops after it finds a non-**Nil** argument or ends up evaluating every argument if all of them return **Nil** | | ^ Description | Uses lazy evaluation, which means that it stops after it finds a non-**Nil** argument or ends up evaluating every argument if all of them return **Nil** | | ||
modding/function/or.txt · Last modified: 2017/01/26 00:26 by 0xabcdef