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 #336 background imageLoading...
Page #336 background image
Chapter
10
I
BASIC
Ke-ywords
VAL
Function
VAL(string)
Calculates the numerical value
of
string.
VAL
is the inverse
of
the STR$ function; it returns the number
represented by the characters in
a
string argument. This num-
ber may be integer, single precision,
or
double precision, depend-
ing on the range
of
values and the rules used
for
typing all
constants
.
VAL
terminates its evaluation on the first character that has no
meaning in a numeric value.
If
the string is nonnumeric
or
null,
VAL
returns a zero.
Ex
ample
s
PRINT VAL("1 00 DOLLARS")
prints
100.
PRINT VAL("1234E5")
prints
123400000.
Sample Programs
10 READ NAME$, CITY$, STATE$, ZIP$
20 IF VALCZIP$)
<
90000
OR
VAL(ZIP$)
>
96699
THEN PRINT NAME$ TABC25) "OUT OF STATE"
30 IF VAL(ZIP$)
>
90801 AND VAL<ZIP$)
<=
90815
THEN PRINT NAME$ TAB(25) "LONG BEACH"
This program searches
for
zip codes within the specified ranges
to
determine if they are within Long Beach
or
"out
of
state.''
334

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