then: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
back to [[Scripting_Reference#T|COMREF]] | |||
<h2 style="color:#000066">if '''then ''else'''''</h2> | <h2 style="color:#000066">if '''then ''else'''''</h2> | ||
Line 4: | Line 6: | ||
'''Operand types:''' | '''Operand types:''' | ||
if: If [[Type]] | '''if:''' If [[Type]] | ||
else: [[Array]] | '''else:''' [[Array]] | ||
'''Type of returned value:''' | '''Type of returned value:''' | ||
Line 14: | Line 16: | ||
'''Description:''' | '''Description:''' | ||
First or second element of array is executed depending on result of if condition. | First or second element of array is executed depending on result of [[if]] condition. | ||
Result of the expression executed is returned as a result (result may be Nothing). | Result of the expression executed is returned as a result (result may be Nothing). | ||
'''Example:''' | '''Example:''' | ||
if (a>b) '''then''' {c=1} else {c=2}; if (a>b) '''then''' [{c=1},{c=2}] | [[if]] (a>b) '''then''' {c=1} [[else]] {c=2}; [[if]] (a>b) '''then''' [{c=1},{c=2}] |