<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>
In File I/O Words in TurboForth Kernal
Reads a record from an external file into a buffer.
Reads a line of input from the file specified by file_id. The address of an appropriately sized buffer (buff_addr) must be supplied.
If the read is successful, the buffer at buff_addr is filled with the data read from the input device, with the first byte being the length count of the data immediately following it. This can be converted into a address/length pair with COUNT.
Returns FALSE if successful or TRUE if not successful. This allows trapping with ABORT" as follows:
MYFILE #GET ABORT" Could not read from file"
If the read fails, IOERR is set to the error code, otherwise it is set to 0.