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 #51 background imageLoading...
Page #51 background image
Chapter
51
Basic
Concepts
#
declares a double precision variable. BASIC stores the
value of the variable as
a
double precision number.
S#,
AD#, and YTDTOTAL# are samples of variables de-
clared as double precision.
declares a string variable. The value
of
the variable must
be enclosed in double quotes. A$, WRD$, and CITY$ are
samples of variables declared
as
string variables.
Note:
Any variable name can represent 4 different
variables. For example, A5%, A5!, AS#, and A5$ are
all valid and distinct variable names.
$
0
Use the following BASIC statements:
DEFINT
DEFSNG
Defines specified variableh) as integer.
Defines specified variable(s) as single precision.
(Since BASIC initially classifies all variables
as
single precision, you need
to
use DEFSNG only if
one
of
the other
DEF
statements is used.)
Defines specified variableb) as double precision.
Defines specified variableb) as string.
DEFDBL
DEFSTR
Chapter 10 describes these BASIC statements fully.
Numeric Precision Conversion
Your program may ask BASIC to convert numeric data from one
precision to another. The following section describes this
procedure.
When converting
singleldouble precision
to
integers,
BASIC
rounds the fractional portion of the number, if any. For example:
A%
=
32766.7
A%
=
-123.4567
BASIC stores as 32767
BASIC stores as -123
When converting
integers
to
singleldouble precision,
BASIC ap-
pends
a
decimal point and zeroes to the right of the original
value. For example:
A#
=
32767
A!
=
-1234 BASIC stores as -1234.000
BASIC stores as 32767.00000000000
49

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