switch: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Reverted edits by Qi8S0s (Talk); changed back to last version by Kronzky)
m (Fixed parametr / return types.)
Line 12: Line 12:
| '''switch''' exp |= Syntax
| '''switch''' exp |= Syntax


|p1= exp: [[Switch Type]] |= Parameter 1
|p1= exp: [[Anything]] |= Parameter 1


| [[Anything]] |= Return value
| [[Switch Type]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   

Revision as of 11:34, 7 August 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: 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