
B–62073E–2/03
4.CONVERSATIONAL MACRO FUNCTION
119
<Data type> specifies what type the data that is going to be
written will be. For the data type, refer to table 3.
<Data> specifies the data that is going to be written. Further,
the execution result of the command is returned to the status
variable number specified by FOPEN. It is necessary that the
user checks this value. For the status value, refer to table 5.
Notes
1 After the data has been written, the pointer is automatically
renewed.
2 File no. 1 (key) cannot be specified.
Example:
FWRIT (200,2,123) ;
Writes the data 123 from the pointer which is currently
indicating the file with file no. 200 in binary format 2 (word
type). Further, the result is returned to the status variable
number specified at opening.
7. Command for setting file pointer
Function:
Sets the file pointer.
Description :
FPSET (File number, pointer type, pointer)
Explanation:
<File number> specifies the file to set the pointer. For the
value, refer to table 1.
<Pointer type> specifies the type the pointer sets. For the
type value, refer to table 4.
<Pointer> specifies the pointer in accordance with the type.,
Further, the execution result of the command is returned to
the status variable number specified by FOPEN. It is
necessary that the user checks this value. For the status value,
refer to table 5.
Notes
1 When the pointer type is 0, <Pointer> is disabled.
2 Pointer can be specified before and after.
3 File number 1 (key) cannot be specified.
Example:
FPSET (200,2,12) ;
Advances the pointer 12 from the pointer currently indicating
the file with file no. 200. Further, the result is returned to the
status variable number specified at opening.
Table 1: File number
1 : Key
200: File (general)
Table 2: Access mode value
0 : Read mode
1 : Write mode, read mode
Table 3: Data type value
0 : Macro format (6 byte)
2 : Binary format 1 (word type)
3 : Binary format 2 (long type)
Table 4: Pointer type value
0 : Sets pointer to head
1 : Sets pointer from head
2 : Sets pointer from current position