Files in RBASIC™
RBASIC files are always text files. To store numeric information, the numbers first need to be converted to a string format (for example using the functions STR$ or FORMAT$). Files can also represent communications ports if a serial port name (i.e. "COM1") is used as a file name.
Opens a file for read.
where file$ is "c:\RBasic programs\myscanner\scandata.txt"
Opens a file for read or write operations. File write operations append new lines to the file (rather than overwrite existing ones). SETFILEPOS can be used to change the current file pointer.
Sets the current file position.
Writes a line to the file at the current file position. The file must be successfully open first using OPENWRITE.
WRITE ("c:\myfile.txt","this is a new line")
Deletes a file.
Closes a file.
Sets the current file position
Sets parameters of a COM Port
SETUPCOMPORT("com1","baud=38400 stop=1 parity=N data=8 dtr=on")
Reads a line from the file$ from the current file position. The file must be already opened for read or write.
Returns the end-of-file status of the file$.
if EOF("c:\myfile.txt") then GOTO finish