PI1X Basic Programming Manual Ver. 1.10
78/156
Purpose
:
To read a specified number of bytes from a file. The current
position is updated after reading.
Syntax
:
STR$ = BGETEXT(N%) # FILEID%
Example
:
STRING1$=BGETEXT(5)#FILEID%
PRINT STRING1$
PRINT "STRING LEN=",LEN(STRING1$)
Description
:
STR$
is a string to be returned to the result.
N%
is an integer indicating the number of bytes to be read.
FILEID%
is an integer variable indicating the file handle.
You can use the GET_FILE_ERROR command to get the
file error code. Possible error codes and their interpretation
are listed below:
GET_FILE_ERROR Meaning
2
File specified does not exist.
7
File not opened