{"name":"BIS_fnc_swapVars","operator":null,"title":"BIS fnc swapVars","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_swapVars","revid":328403,"updated":"2022-07-13T16:00:49Z","groups":["Variables"],"status":"ok","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Swaps the values of two variables **passed as String**.\n\nNothing is returned as this function modifies the variables directly.","syntaxes":[{"syntax":"[variableName1, variableName2] call BIS_fnc_swapVars","since":null,"effect":null,"exec":null,"params":[{"name":"variableName1","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"variableName1: String"},{"name":"variableName2","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"variableName2: String"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"}}],"examples":[{"text":"```sqf\nprivate _a = 1;\n_b = 2;\n[\"_a\", \"_b\"] call BIS_fnc_swapVars;\n_a == 2; // true\n_b == 1; // true\n```","code":["private _a = 1;\n_b = 2;\n[\"_a\", \"_b\"] call BIS_fnc_swapVars;\n_a == 2; // true\n_b == 1; // true"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":[],"notes":[],"categories":["Arma 2: Functions","Arma 2: New Functions","Arma 2: Operation Arrowhead: Functions","Arma 3: Functions","Function Group: Variables","Functions","Introduced with Arma 2 version 1.00","Take On Helicopters: Functions"],"docblock":null,"filled_from_docblock":[]}