AT&T 6300 Programmer's Manual page 474

Gwbasic by microsoft
Hide thumbs Also See for 6300:
Table of Contents

Advertisement

SWAP
Statement
Syntax
variablel
and
variable2
Remarks
Example
7-318
Exchanges the values of two variables.
SWAP variable! , variable2
are two variables of the same type (integer, single-precision,
double-precision, or string).
The two variables must be of the same type or
a "Type Mismatch" error occurs. The second
variable must already be defined or an
"Illegal function call" error occurs.
10 AS= HONE" : BS= HALL" : CS=HFOR"
20 PRINT AS CS BS
30 SWAP AS. BS
40 PRINT AS CS BS
RUN
ONE FOR ALL
ALL FOR ONE
Ok

Advertisement

Table of Contents
loading

Table of Contents