switch: Difference between revisions

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


| arma |= Game name
|1.00|= Game version
____________________________________________________________________________________________
| See [[switch do]] |= Description
____________________________________________________________________________________________
| '''switch''' exp |= Syntax
|p1= exp: [[Switch Type]] |= Parameter 1
| [[Anything]] |= Return value
____________________________________________________________________________________________
 
|x1= <code>switch (_a) [[do]] {[[case]] 1: {block}; [[case]] 2 : {block}; [[default]] {block};}</code> |= Example 1
____________________________________________________________________________________________
| [[Control Structures]]  |= 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|SWITCH]]
[[Category:Scripting Commands|SWITCH]]
[[Category:Scripting Commands ArmA|SWITCH]]
[[Category:Scripting Commands ArmA|SWITCH]]
[[Category:ArmA: Control Structures|SWITCH]]
[[Category:Command Group: Program Flow|SWITCH]]

Revision as of 15:47, 15 January 2007

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
See switch do
Groups:
Uncategorised

Syntax

Syntax:
switch exp
Parameters:
exp: Switch Type
Return Value:
Anything

Examples

Example 1:
switch (_a) do {case 1: {block}; case 2 : {block}; default {block};}

Additional Information

See also:
Control Structures

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