
4. CONVERSATIONAL MACRO FUNCTION
B–62073E–2/03
118
Example:
FOPEN (200,1,100)
Opens the file with file no. 200 in the writing and reading
modes. Further, the result is returned to macro variable #100.
4. Command for closing files (FCLOS)
Function:
Commands closing of files.
Description:
FCLOS (File number)
Explanation:
<File number> specifies the file number to close. For the
value, refer to table 1.
Further, the execution result of the command is returned to
the status variable number specified by FOPEN. It is
necessary that the user check this value. For the status value,
refer to table 5.
Example:
FCLOS (200)
Closes the file with file number 200. Further, the result is
returned to the status variable number specified at the
opening.
5. Command for reading files (FREAD)
Function:
Reads the contents of files.
Description:
FREAD (File number, data type, data variable number)
Explanation:
<File number> specifies the file number that is going to be
read. For the value, refer to table 1.
<Data type> specifies what type the data that is going to be
read will be. For the data type, refer to table 3.
<Data variable number> specifies the macro variable number
to substitute the data which was read.
Further, the execution result of the command is returned to
the status variable number specified by FOPEN. It is
necessary that the user check this value. For the status value,
refer to table 5.
Notes
1 After the data has been read, the pointer is automatically
renewed.
2 The data type of file no. 1 (key) must be specified in binary
format (word type).
Example:
FREAD (200,2,500)
Substitutes the data from the pointer currently indicating the
file with file no. 200 to the read #500 common variable in
binary format (word type).
6. Command for writing files (FWRIT)
Function:
Writes data to files.
Description:
FWRIT (File number, Data type, data)
Explanation:
<File number> specifies the file number that is going to be
written. For the value, refer to table 1.