Exchange the values of two variables. Both variables must be the same type (numeric or string) and may be array elements.
SWAP a, b
Example:
A = 1 : B = 2
SWAP A, B
PRINT A; B
DIM N$(1)
N$(0) = "left" : N$(1) = "right"
SWAP N$(0), N$(1)
PRINT N$(0); N$(1)
Source: docs/help/swap.txt inmmcore. On the computer, typeHELP SWAP.