Explanation
SWAP Statement
Exchanges the values of two variables.Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
SWAP variable1, variable2 |
variable1 and variable2 | Two variables of the same data type. |
a% = 1: b% = 2
PRINT "Before: "; a%, b%
SWAP a%, b%
PRINT "After: "; a%, b%