|Description:||Swaps the values of two variables, passed in quotes. Nothing is returned, as this function modifies the variables directly.|
This function can be useful if you do not wish to create a third variable, just to do the swap.
|Syntax:||[var1, var2] call fn_vbs_swapVars|
When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.
_a = 1; _b = 2; ["_a","_b"] call fn_vbs_swapVars //_a now equals 2 //_b now equals 1