
PT-Basic Programming Manual Ver. 1.00 78/143
To read a byte from a file. The current position is updated
after reading.
STRING1%=BGET # FILEID%
PRINT CHR$(STRING1%)
STR% is an integer variable to be returned to the result.
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:
File specified does not exist.
To read a specified number of bytes from a file. The current
position is updated after reading.
STR$ = BGETEXT(N%) # FILEID%
STRING1$=BGETEXT(5)#FILEID%
PRINT STRING1$
PRINT "STRING LEN=",LEN(STRING1$)
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:
File specified does not exist.
Comentarios a estos manuales