BIS fnc swapVars: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>")  | 
				Lou Montana (talk | contribs)  m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>")  | 
				||
| Line 28: | Line 28: | ||
|x1= <code>private _a = 1;  | |x1= <code>private _a = 1;  | ||
_b = 2;  | _b = 2;  | ||
["_a", "_b"]   | ["_a", "_b"] call [[BIS_fnc_swapVars]];  | ||
_a == 2; {{cc|true}}  | _a == 2; {{cc|true}}  | ||
_b == 1; {{cc|true}}</code>  | _b == 1; {{cc|true}}</code>  | ||
Revision as of 21:38, 12 July 2022
Description
- Description:
 - Swaps the values of two variables passed as String.
Nothing is returned as this function modifies the variables directly. - Execution:
 - call
 - Groups:
 - Variables
 
Syntax
- Syntax:
 - [variableName1, variableName2] call BIS_fnc_swapVars
 - Parameters:
 - variableName1: String
 - variableName2: String
 - Return Value:
 - Nothing
 
Examples
- Example 1:
 private _a = 1; _b = 2; ["_a", "_b"] call BIS_fnc_swapVars; _a == 2; // true _b == 1; // true
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