Community QBasic

Rebooting the QBasic we all know and love!


Project maintained by Cory Smith

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