
PT-Basic Programming Manual Ver. 1.00 79/143
Read a line terminated by a null character “\0” from a file.
FileData$ = GET$ # FILEID%
WHILE (EOF#FILEID% <> -1)
Str$=GET$ # FILEID%
PRINT Str$
WEND
FileData$ is a string 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.
BPUT # FILEID% , <expr 1>, <expr 2>, ... ,<expr n>
AAA%=168
BPUT # FILEID%,STR$(AAA%),"HELLO"
FILEID% is an integer variable, indicating the file handle.
expr 1 ~ expr n is string expression indicating the string data
to write to file.
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.
Not enough memory to write to
file.
Komentáře k této Příručce