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 #133 background imageLoading...
Page #133 background image
Chapter
10
I
BASIC
Keywords
CVD, CVI, CVS
Function
CVD(8- byte string)
CVI(2-byte string)
CVS(4-byte string)
Converts string values to numeric values.
These functions restore data to numeric form after it is read
from the disk. Typically, the data has been read by a GET state-
ment and is stored in a direct access file buffer.
CVD converts an 8-byte string
to
a
double precision number.
CVS converts a 4-byte string to
a
single precision number.
CVI converts
a
2-byte string
to
an integer.
CVD, CVI, and CVS are the inverse
of
MKD$, MKI$, and
MKS$, respectively.
Examples
A#
=
CVD<GROSSPAY$)
assigns the numeric value
of
GROSSPAY$
to
the double precision
variable A#.
Sample Program
This program reads from the file
test.dat,
which is created in the
sample program for the MKD$, MKI$, and MKS$ functions.
1420 OPEN
"R",
1,
"te~t.dat",
14
1430
FIELD
1,
2
AS
I1$,
4
AS
I2$,
8
AS
13s
1440 GET
1
1450 PRINT CVI<Il$), CVS(I2$), CVD(I39)
1460
CLOSE
BASIC prints 3000, 3000.1 and 3000.00001.
Note:
GET without
a
record number tells BASIC to
get the
first
record from the file or the record follow-
ing the last record accessed.
131

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