SWAP¶
Function¶
SWAP exchanges the values of two variables.
Syntax¶
SWAP variable 1, variable 2
Example¶
SWAP A,B
this will put the value of variable A into B and the value of B into A.
SWAP A$,BS
this will put the contents of A$ into B$ and the contents of B$ into A$.
Remark¶
Any type of variables may be swapped (single precision, double precision or string), but the two variables must be of the same type or a Type Mismatch error will occur.