Closes (almost) all open files.

Syntax

CLOSE ALL [PERSISTENT]

PERSISTENT

In addition to files closed by CLOSE ALL, the PERSISTENT designation closes files tagged PERSISTENT. Without the PERSISTENT designation, these files would not be affected.

Description

CLOSE ALL closes almost all open files, including:

All databases opened by the Navigator and with OPEN DATABASE

All tables opened (with USE) in all work areas in the current workset

All files opened with low-level file functions, or a File object

All procedure and library files opened with SET PROCEDURE and SET LIBRARY

Any text streaming file opened by SET ALTERNATE

It does not close:

The printer file specified by the SET PRINTER TO command

Tables or databases opened through the data objects

Use CLOSE ALL during development to close files and reset your working environment without affecting any variables. To close all files and release all variables, use CLEAR ALL. Because of the event-driven nature of dBASE Plus, CLOSE ALL is generally not used in programs.