then: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
[[Category:Scripting Commands|THEN]]
{{Command|= Comments
[[Category:Scripting Commands OFP 1.96|THEN]]
____________________________________________________________________________________________
[[Category:Scripting Commands ArmA|THEN]]
[[Category:Armed Assault: Control Flows|THEN]]


| ofpr |= Game name


<h2 style="color:#000066">'''''if'' then ''else'''''</h2>
|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).
Examples: [[if]] (a>b) then {c=1} [[else]] {c=2}; [[if]] (a>b) then {c=1;c=2} |= Description
____________________________________________________________________________________________


'''Operand types:'''
| if '''then''' else |= Syntax


'''if:''' [[If Type]]
|p1= if: [[If Type]] |= Parameter 1


'''else:''' [[Array]]
|p2= else: [[Array]] |= Parameter 2


'''Type of returned value:'''
| [[Anything]] |= Return value
____________________________________________________________________________________________


[[Anything]]
|  |= See also


'''Compatibility:'''
}}


Added in version '''1.85'''
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


'''Description:'''
<!-- Note Section END -->
</dl>


First or second element of array is executed depending on result of [[if]] condition.
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Scripting Commands|THEN]]
Result of the expression executed is returned as a result (result may be nothing).
[[Category:Scripting Commands OFP 1.96|THEN]]
 
[[Category:Scripting Commands ArmA|THEN]]
 
[[Category:Armed Assault: Control Flows|THEN]]
'''Examples:'''
 
[[if]] (a>b) '''then''' {c=1} [[else]] {c=2}; [[if]] (a>b) '''then''' {c=1;c=2}

Revision as of 23:53, 1 August 2006

Hover & click on the images for description

Description

Description:
if then else
Groups:
Uncategorised

Syntax

Syntax:
Anything
Parameters:
if: If Type
else: Array
Return Value:
Return value needed

Examples

Examples:
Example needed

Additional Information

See also:
See also needed

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section