EasyManua.ls Logo

Commodore 128D - Page 301

Commodore 128D
427 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
RECORD
r-\
EXAMPLES:
10
READ
A,
B,
C
20
DATA
3,
4,
5
READ
the
first
three
numeric
variables
from
the
closest
data
statement.
10
READ
A$,
B$,
C$
READ
the
first
three
string
20
DATA
JOHN,
PAUL,
GEORGE
string
variables
from
the
nearest
data
statement.
10
READ
A,
B$,
C
20
DATA
1200,
NANCY,
345
READ
a
numeric
variable,
a
string
variable
and
another
numeric
variable.
—Position
relative
file
pointers
RECORD#
logical
file
number,
record
number
[,byte
number]
This
statement
positions
a
relative
file
pointer
to
select
any
byte
(character)
of
any
record
in
the
relative
file.
The
logical
file
number
can
be
in
the
range
between
0
and
255.
The
record
number
can be
in
the
range
0
through
65535.
Byte
number
is
in
the
range
1
through
254.
See
your
disk
drive
manual
for
details
about
relative
files.
When
the
record
number
valoe-is
set
higher
than
the
last
record
number
in
the
file,
the
following
occurs:
For
a
write
(PRINT#)
operation,
additional
records
are
created
to
expand
the
file
to
the
desired
record
number.
For
a
read
(INPUT#)
operation/a
null
record
is
returned
and
a
"RECORD
NOT
PRESENT
ERROR"
occurs.
EXAMPLES:
10
OPEN
2,8,2"CUSTOMER,R,W"
20
RECORD#2,10,1
30
PRINT#2,A$
40
CLOSE
2
This
example
opens
an
existing
relative
file
called
"CUSTOMER"
as
file
number
2
in
line
10.
Line
20
positions
the
relative
file
pointer
at
the
first
byte
in
record
number
10.
Line
30
actually
writes
the
data,
A$,
to
file
number
2.
293
BASIC
7.0
ENCYCLOPEDIA—Basic
Commands
and
Statements

Table of Contents

Other manuals for Commodore 128D

Related product manuals