EasyManua.ls Logo

Apple IIe - Page 224

Apple IIe
320 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...
224
Apple
lie Users
Handbook
150 INPUT
X$
160 PRINT
D$; "CLOSE
RANDOM
"
170 RETURN
180 INPUT "
ENTER
RECORD NUMBER
";
R
190 GOSUB 130
200
PRINT
X$
210
GOTO
180
Byte Parameter
The B
or
byte
parameter
can be used
with
the
READ,
WRITE,
and
POSITION
statements
to
move
the
file
pointer
to
a specified byte
with
in a
sequential
file
or
a specified
byte
within
a specified
field
in a
random
file
.
For
ex
ample
,
the
following
command:
WRITE
TEXT
A,
B20
would
set
the
file
pointer
to
the
twenty-first
byte
in
the
s
equen
tial
file
named
TEXT
A. The first byte
is
byte
0.
Any
characters
output
to
the
disk
file
by subsequent
PRINT
statements
will
replace existing characters in
TEXT
A
beginning
with
byte
21
.
If
R
is
specified,
the
B
parameter
sets
the
file
pointer
to
the
s
pecified
byte
in
the
record
indicated
by
R.
In
the
following
example:
READ
TEXT
A,
R20
,
B4
the
read
operation
will
begin at
the
fifth
byte in
the
twenty-first
rec
ord
.
When
using
the
byte
parameter
,
the
user must
know
exactly
what
data
ha
s
been
stored in
the
file
.
Remember
that
spaces,
c
omma
s,
return
codes, and
all
characters are stored in
byte
positions
with
in a
field
.