Community QBasic

Rebooting the QBasic we all know and love!


Project maintained by DualBrain

SWAP

Exchanges the value of two variables.

Syntax

SWAP variable1,variable2

Comments

variable1 and variable2 must be the same type.

Example

a = 1
b = 2
SWAP a, b
PRINT a, b
2        1