then: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{Command|= Comments
#REDIRECT [[Control Structures#if-Statement]]
____________________________________________________________________________________________


| ofpr |= Game name
|1.85|= Game version
____________________________________________________________________________________________
| 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).  |= Description
____________________________________________________________________________________________
| if '''then''' else |= Syntax
|p1= if: [[If Type]] |= Parameter 1
|p2= else: [[Array]] |= Parameter 2
| [[Anything]] |= Return value
____________________________________________________________________________________________
|x1 = <code>[[if]] (a>b) then <nowiki>{c=1}</nowiki> [[else]] <nowiki>{c=2}</nowiki></code> | = Example 1
|x2 = <code>[[if]] (a>b) then <nowiki>{c=1;c=2}</nowiki></code>| = Example 2
|  |= See also
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|THEN]]
[[Category:Scripting Commands|THEN]]
[[Category:Scripting Commands OFP 1.96|THEN]]
[[Category:Scripting Commands OFP 1.96|THEN]]

Revision as of 21:26, 21 December 2006