20,741
edits
m (rename Philosopher's custom tag ;-)) |
mNo edit summary |
||
| Line 50: | Line 50: | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
if (getprop("/sim/signals/freeze")) { | if (getprop("/sim/signals/freeze")) { | ||
# true block, will be executed if condition is true | |||
} else { | |||
# false block, will be executed if condition is false | |||
} | |||
</syntaxhighlight> | |||
The condition can also be arbitrarily complex, in that it can be made up of other conditions, that may be nested using these boolean operators: | |||
* '''!''' (not) | |||
* '''and''' | |||
* '''or''' | |||
<syntaxhighlight lang="php"> | |||
var condition = (1==1 and 2==2 and 3==3) or (4!=5 and !0); | |||
if (condition) { | |||
# true block, will be executed if condition is true | # true block, will be executed if condition is true | ||
} else { | } else { | ||