if: 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|IF]]
{{Command|= Comments
[[Category:Scripting Commands OFP 1.96|IF]]
____________________________________________________________________________________________
[[Category:Scripting Commands ArmA|IF]]
[[Category:Armed Assault: Control Flows|IF]]


<h2 style="color:#000066">'''if ''condition'''''</h2>
| ofpr |= Game name


|1.85|= Game version
____________________________________________________________________________________________


'''Operand types:'''
| First part of if command. |= Description
____________________________________________________________________________________________


'''condition:''' [[Boolean]]
| '''if''' condition |= Syntax


'''Type of returned value:'''
|p1= condition: [[Boolean]] |= Parameter 1


[[If Type]]
| [[If Type]] |= Return value
____________________________________________________________________________________________
 
|x1= <pre>if (a>b) [[then]] {a=b}</pre> |= Example 1
____________________________________________________________________________________________


'''Compatibility:'''
|  |= See also


Added in version '''1.85'''
}}


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


First part of if command.
<!-- Note Section END -->
</dl>


<h3 style="display:none">Bottom Section</h3>
Old Notes (temporary):


'''Example:'''
Standard syntax = if a [[then]] b Alternative syntax = ? a : b See also: [[else]]
 
[[Category:Scripting Commands|IF]]
'''if''' (a>b) [[then]] {a=b}
[[Category:Scripting Commands OFP 1.96|IF]]
 
[[Category:Scripting Commands ArmA|IF]]
 
[[Category:Armed Assault: Control Flows|IF]]
'''Comments:'''
 
Standard syntax = '''if''' a [[then]] b
 
Alternative syntax = '''?''' a ''':''' b
 
See also: [[else]]

Revision as of 00:30, 2 August 2006

Hover & click on the images for description

Description

Description:
First part of if command.
Groups:
Uncategorised

Syntax

Syntax:
if condition
Parameters:
condition: Boolean
Return Value:
If Type

Examples

Example 1:
if (a>b) [[then]] {a=b}

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

Old Notes (temporary):

Standard syntax = if a then b Alternative syntax = ? a : b See also: else