Evaluate a conditional expression, if the outcome of the expression is non nil, false, or 0, execute the block immediately following the if statement. Otherwise, execute the block following the optional else statement.
Different languages treat different values that aren't a true/false boolean differently. In DekiScript false as well as nil and zero are logically false, while True and everything else (other than nil,false or 0) are treated as logically true.
1.9.1 or later.
| Output | |||
|
| ||
| Welcome guest. Please register! |
The foreach statements enables iteration over list, map, and xml values. The foreach statement also sets the the global variable __count to indicate how many iterations it has performed so far.
8.05.1 or later.
| Output | ||
| 123 | |
| 123 | |
|
The var statement declares a new variable in the current scope. Variables with the same name outside the current scope are not affected. The declared variable remains accesible until the current scope ends.
8.05.1 or later.
| Output | ||
| 11 |
The let statement assigns a new value to an existing variable. If the variable does not exist, it is declared as if the let statement were a var statement.
8.05.1 or later.
| Output | ||
| 11 | |
| 12 | |
| 8 | |
| 20 | |
| 5 | |
| 0 | |
| hello world |
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by