The file servicing makes it possible to work with maximum two files at a time. From one file the data can only be read, and to the other one the data can only be written. The data cannot be read from and written into the same file at a time. When using the files, the name of the file which the data are to be read from and that of the file into which the data is be written into has to be set. During the first file data access the file will be opened. The file will be closed automatically, if not used, or when setting the file name anew. If an error arises during some file operations, the operation error flag will be set.
active disk and folder
The active disc and folder element is used as a text variable (enabling reading and writing), indicating the default disk and folder (in form of "disk:\path"), which will be used to enter an incomplete specification of a file or a folder. When an invalid disk or folder is set, the operation error flag will be set.
active file/folder for reading
The active file/folder for reading element is a text variable (with the possibility of reading and writing) indicating the name of a file or of a folder, from which it will be read or the parameters of which will be found out. When setting the name of the file (or folder) for reading into it the previously opened file for reading or writing will be closed (the operation error flag may be set at the same time), and the pointer of the file for reading will be set to 0. The file will be opened (and the name validity will possibly be checked) only during the first access to the file data. The data cannot be read from and written into the same file at a time.
active file/folder for writing
The active file/folder for writing element is a text variable (with the possibility of reading and writing) designating the name for the file or folder to which data will be written into, or the parameters of which will be set. When setting the name of the file (or folder) for writing into it the previously opened file for reading or writing will be closed (the operation error flag may be set at the same time), and the pointer in the file for writing will be set to 0. The file will be opened (and the name validity will possibly be checked) only during the first access to the file data. The data cannot be read from and written into the same file at a time.
operation error flag
The operation error flag element is a logic flag serving to indicate an error turning up during a file operation. The flag is set when an operation error appears. It must be switched off by the program before running any operations. This feature makes it possible to test the operation flag till after running several file operations at a time. The flag is only informatory, exerting no influence on the program functioning.
program execution
The program execution element serves to carry out a system command or to start a program. The program name is entered as a text parameter. Following the program name program parameters may be entered. If the program name contains spaces, then the name must be entered between quotes ("This is a program"). If a command cannot be carried out as a program, the command is passed on to the system for carrying it out (e.g. the "DIR" command). It is not waited to finish a running program.
program execution with waiting
The program execution with waiting element serves to carry out a system command or to start a program in a similar way as it is done by the previous element. A difference consists in the fact that this element will wait till a running program is finished, and will return a numeric value as the program's return code.
return code of the program
The
return code of the program element is located in the
local variables of the program
main function (not in the basic elements). This is a positive integral variable enabling to pass on a numeric code to other programs that have called this program. It is a common usage of the return code that the 0 value represents a proper program execution, whereas values greater than 0 (integral numbers only) indicate an error code.
Full Html Context Help of The Peter - Gemtree Software & Children Programming