QBasic 1.1: SWAP Statement

Syntax

SWAP variable1, variable2

Description / Parameter(s)

variable1 and variable2 Two variables of the same data type.

Example

a% = 1: b% = 2 PRINT "Before: "; a%, b% SWAP a%, b% PRINT "After: "; a%, b%