switch: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fixed example link to do)
mNo edit summary
Line 37: Line 37:
[[Category:ArmA: Control Structures|SWITCH]]
[[Category:ArmA: Control Structures|SWITCH]]
[[Category:Command Group: Program Flow|SWITCH]]
[[Category:Command Group: Program Flow|SWITCH]]
[[Category:Command_Group:_Variables|{{uc:{{PAGENAME}}}}]]

Revision as of 22:47, 10 January 2008

-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: Anything
Return Value:
Switch Type

Examples

Example 1:
switch (_a) do {case 1: {block}; case 2 : {block}; default {block};}
Example 2:
_color=switch (side player) do {
  case west: {"ColorGreen"};
  case east: {"ColorRed"};
};

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