Section 13.1: Packages Up Chapter 13: Aubit4GL Packages Section 13.3: file 

13.2 channel

This library allows simple read/write access to files in a manner similar to that provided by some other 4GL vendors.

13.2.1 Dependencies


13.2.2 Function list open_file

opens a file and associates ’handle’ as a name for that file. flag is
’u’ - use standard input/output
’r’ - readonly
’w’ - writeonly
’a’ - append open_pipe

runs a command and allows reading/writing to that command via a pipe. flag is
’u’ - input and output (*not implemented)
’w’ - write only
’r’ - read only
’a’ - write only (*append is identical to ’write only’ in this context) set_delimiter

This sets the default field separator for a file close

This closes the handle and associated file fgl_read*

This reads from a file and returns each field as a separate return value. The number of values returned will therefore depend in the number of fields on each line of the file. This function is not part of the current implementation. As has been superceded by the ’read’ function. read

read(handle,[variable list])
This reads the fields from the file (separated by the delimiter) and put that data into the variables passed to the read function.
eg. read("file",[var1,var2,var3]) write

write(handle,[variable list])
eg. write("file",[var1,var2,var3])
This writes the data passed in to the specified file.
 Section 13.1: Packages Up Chapter 13: Aubit4GL Packages Section 13.3: file