Using TEXTIO
Reading from a file
- READLINE reads a line from the file into a LINE buffer
- READ gets data from the buffer
Writing to a file
- WRITE puts data into a LINE buffer
- WRITELINE writes the data in the LINE buffer to file
READ and WRITE have several formatting parameters
- Right or left justification
- Field width
- Unit displayed (for time)
Notes:
TEXTIO requires that all disk access go through a buffer of type LINE. In addition, the READ and WRITE procedures can further format the text. The field width of the text is the length of the text if not otherwise specified. If the text is of type TIME, the unit of time can be specified.