a : b: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(add. ArmA2 classification)
m (Some wiki formatting)
 
(59 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma |= Game name
|sortKey= #


|1.00|= Game version
|game1= arma1
____________________________________________________________________________________________
|version1= 1.00


| see [[switch]] |= Description
|game2= arma2
____________________________________________________________________________________________
|version2= 1.00


| a ''':''' b |= Syntax
|game3= arma2oa
|version3= 1.50


|p1= a: [[Switch Type]] |=
|game4= tkoh
|version4= 1.00


|p2= b: [[Code]] |=
|game5= arma3
|version5= 0.50


| [[Nothing]] |= Return value
|gr1= Program Flow
____________________________________________________________________________________________


|x1=  |=
|descr= See [[switch]]


| |= See also
|s1= a [[a : b|:]] b


}}
|p1= a: [[Switch Type]]


<h3 style="display:none">Notes</h3>
|p2= b: [[Code]]
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|r1= [[Nothing]]
</dl>


<h3 style="display:none">Bottom Section</h3>
|x1= <sqs>? (_var == _test) : hint "_var is equal to _test!";</sqs>


|x2= <sqf>
switch (_condition) do
{
case 1: { hint "1" };
case 2: { hint "2" };
default { hint "default" }; // note: NO colon for the default case
};
</sqf>


[[Category:Scripting Commands|#]]
|seealso= [[Control Structures]] [[switch]]
[[Category:Scripting Commands ArmA|#]]
}}
[[Category:Scripting Commands ArmA2|#]]

Latest revision as of 14:38, 29 July 2022

Hover & click on the images for description

Description

Description:
See switch
Groups:
Program Flow

Syntax

Syntax:
a : b
Parameters:
a: Switch Type
b: Code
Return Value:
Nothing

Examples

Example 1:
? (_var == _test) : hint "_var is equal to _test!";
Example 2:
switch (_condition) do { case 1: { hint "1" }; case 2: { hint "2" }; default { hint "default" }; // note: NO colon for the default case };

Additional Information

See also:
Control Structures switch

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