FBPL Command Reference

Table Of Contents
137
10.14 FREAD$()
Description
Read a specified number of bytes of data from a file.
Syntax
FREAD$ (file handle,byte)
Parameter
Description
file handle
0 or 1
byte
Number of bytes to be read
Example
Sample code
DOWNLOAD "DATA1",10,1234567890
DOWNLOAD "DATA2",15,ABCDEFGHIJKLMNO
DOWNLOAD "OPEN2.BAS"
SIZE 4,1
GAP 0,0
DIRECTION 1
CLS
OPEN "DATA1",0
OPEN "DATA2",1
SEEK 0,0
SEEK 1,0
Y$=FREAD$(0,6)
Z$=FREAD$(1,6)
TEXT 10,100,"3",0,1,1,"FREAD$(0,6) IS: " +Y$
TEXT 10,150,"3",0,1,1,"FREAD$(1,6) IS: " +Z$
PRINT 1
EOP
OPEN2
Result
See Also
DOWNLOAD, EOP, OPEN, READ, EOF, LOF(), SEEK