EasyManuals Logo

Tandy 1000 Basic Reference Manual

Default Icon
411 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #326 background imageLoading...
Page #326 background image
Chapter
10
I
BASIC Keywords
Statement
SWAP
varia
blel
paria
ble2
Exchanges the values
of
2
variables.
You may swap variables
of
any type (integer, single precision,
double precision, or string). However, both must be
of
the same
type; otherwise, a "Type mismatch" error results.
Either or both variables may be elements
of
arrays. If one or
both
of
the variables are non-array variables that have not been
assigned values, an "Illegal function call" error results.
Example
SWAP
F1#,
F2#
swaps the values
of
F1# and F2#. The contents
of
F2# are put
into F1#, and the contents
of
F1# are put into F2#.
Sample
Program
10 A$="ONE ":B$="ALL ":C$="FOR
"
20 PRINT
A$
C$
E$
30
SWAP
AS,
E$
40
PRINT
A$
C$
E$
When run, the program displays:
ONE
FOR
ALL
ALL FOR ONE
324

Table of Contents

Other manuals for Tandy 1000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tandy 1000 and is the answer not in the manual?

Tandy 1000 Specifications

General IconGeneral
ProcessorIntel 8088
Processor Speed4.77 MHz
RAM128 KB (expandable to 640 KB)
Operating SystemMS-DOS 2.11
ManufacturerTandy Corporation
Release Year1984
StorageSingle or double 5.25" floppy disk drive (360 KB), optional hard drive
SoundTandy 3-voice sound
PortsParallel, Serial
GraphicsCGA (Color Graphics Adapter)
Graphics Modes320x200, 640x200

Related product manuals