<< Click to Display Table of Contents >> Navigation: ThinBASIC Core Language > BuiltIn Functions > Variables functions > Swap |
Description
Swap the content of two variables.
Syntax
Swap Var1, Var2
Swap (Var1, Var2)
Returns
None
Parameters
Name |
Type |
Optional |
Meaning |
Var1 |
Any |
No |
Any variable name. |
Var2 |
Any |
No |
Any variable name. |
Remarks
Swap can exchange the following variable types:
1.any numeric variable
2.any string variable
3.any numeric array element
4.any string array element
5.any UDT variable
6.any UDT array element
Restrictions
Var1 and Var2 must be single variable names already declared.
Expressions will generate a runtime error.
See also
Examples