BIS fnc swapVars: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Variables(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "") |
Lou Montana (talk | contribs) m (Text replacement - "= <code>([^<{]+)<\/code>" to "= <sqf>$1</sqf>") |
||
(19 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=function | |||
|game1= arma2 | |||
|version1= 1.00 | |||
| | |game2= arma2oa | ||
|version2= 1.50 | |||
|1.00 | |game3= tkoh | ||
|version3= 1.00 | |||
| | |game4= arma3 | ||
|version4= 0.50 | |||
| | |gr1= Variables | ||
| | |descr= Swaps the values of two variables '''passed as [[String]]'''.<br> | ||
Nothing is returned as this function modifies the variables directly. | |||
| | |s1= [variableName1, variableName2] call [[BIS_fnc_swapVars]] | ||
| | |p1= variableName1: [[String]] | ||
| [[ | |p2= variableName2: [[String]] | ||
|x1= < | |r1= [[Nothing]] | ||
|x1= <sqf>private _a = 1; | |||
_b = 2; | _b = 2; | ||
["_a", "_b"] | ["_a", "_b"] call BIS_fnc_swapVars; | ||
_a == 2; | _a == 2; // true | ||
_b == 1; | _b == 1; // true</sqf> | ||
| | |seealso= | ||
}} | }} | ||
Latest revision as of 18:00, 13 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:
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