bas7advr.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
SWAP Statement Details
◄Syntax► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
SWAP exchanges the values of two variables.
SWAP variable1, variable2
Usage Notes
■ SWAP is an assignment statement that exchanges the values of two
variables.
■ Any type of variable can be swapped (integer, long, single
precision, double precision, string, currency, or record). However,
if the two variables are not exactly the same type, BASIC generates
the error message, "Type mismatch."