CLOSE Statement ---------------------------------------------------------------------------- Action Concludes I-O to a file, device, or ISAM table. Syntax CLOSE--#-filenumber%-,-#-filenumber%--... Remarks The CLOSE statement complements the OPEN statement. The argument filenumber% is the number used in the OPEN statement to open the file, device, or ISAM table. A CLOSE statement with no arguments closes all open files and devices, including all open ISAM tables. The association of a file, device, or ISAM table with filenumber% ends when a CLOSE statement is executed. You then can reopen the file, device, or table using the same or a different file number. Any ISAM operation that closes a table causes transactions to be committed. For example, if a type mismatch occurs while you are opening an ISAM table, the table is closed and a pending transaction is committed. You may wish to code your programs so they first open all tables, then perform all transactions, then close tables. Make sure any operation that can close a table occurs outside a transaction. Using a CLOSE statement for a file or device that was opened for sequential output writes the final buffer of output to that file or device. CLOSE releases all buffer space associated with the closed file, device, or table. The CLEAR, END, RESET, RUN, and SYSTEM statements, and the CHAIN statement when used with the -O command-line option, also close all files, devices, and tables. Note CLOSE commits any pending ISAM transactions. See Also END, OPEN, RESET, STOP Example See the FREEFILE function programming example, which uses the CLOSE statement.