Mitsubishi MELFA CR1D Instruction Manual page 174

Table of Contents

Advertisement

4MELFA-BASIC IV
Close (Close)
[Function]
Closes the designated file.(including communication lines)
[Format]
Close[] [[#]<File No.>[, [[#]<File No.> ...]
[Terminology]
<File No.>
[Reference Program]
1 Open "COM1:" AS #1
2 Print #1,M1
:
10 Input #1,M2
11 Close #1
:
20 Close
[Explanation]
(1) This instruction closes files (including communication lines) opened by the Open instruction. Data
remaining in the buffer is flushed.
The data left in the buffer will be processed as follows when the file is closed:
Table 4-14:Processing of each buffer when the file is closed
Communication line reception buffer
Communication line transmission
buffer
File load buffer
File unload buffer
(2) Executing an End statement will also close a file.
(3) If the file number is omitted, all files will be closed.
[Related instructions]
Open
(Open),
Print
4-161 Detailed explanation of command words
Specify the number of the file to be closed (1 to 8). Only a numerical constant is allowed.
If this argument is omitted, all open files are closed.
' "Open "COM1:" as file No. 1.
' Close file No. 1, "COM1:".
' Close all open files.
Buffer types
(Print),
Input (Input)
Processing when the file is closed
The contents of the buffer are destroyed
(No data remains in the transmission buffer since the data in the transmission
buffer is sent immediately by executing the Print instruction.)
The contents of the buffer are destroyed.
The contents of the buffer are written into the file, and then the file is closed.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melfa cr2dMelfa cr3d

Table of Contents