/sys$common/syshlp/helplib.hlb PASCAL, Input Output, General, OPEN *Conan The Librarian (sorry for the slow response - running on an old VAX) |
The OPEN procedure opens a file and allows you to specify file characteristics. Syntax: OPEN( file_variable ,[[file_name]] ,[[history]] ,[[record_length]] ,[[access_method]] ,[[record_type]] ,[[carriage_control]] ,[[organization]] ,[[disposition]] ,[[file_sharing]] ,[[user_action]] ,[[default_file_name]] ,[[ERROR := error_recovery]] ) OPEN( FILE_VARIABLE := file_variable [[,FILE_NAME := file_name]] [[,HISTORY := history]] [[,RECORD_LENGTH := record_length]] [[,ACCESS_METHOD := access_method]] [[,RECORD_TYPE := record_type]] [[,CARRIAGE_CONTROL := carriage_control]] [[,ORGANIZATION := organization]] [[,DISPOSITION := disposition]] [[,SHARING := file_sharing]] [[,USER_ACTION := user_action]] [[,DEFAULT := default_file_name]] [[,ERROR := error_recovery]] ) Before the OPEN procedure is called, the file is in undefined mode; its mode does not change after OPEN has been executed. You cannot use OPEN on a file variable that is already open. If you use INPUT, OUTPUT, or ERR, Compaq Pascal implicitly opens them just before their first use. Compaq Pascal implicitly opens INPUT with a history of READONLY. If you choose, you can explicitly open INPUT, OUTPUT, or ERR; to do this, call the OPEN procedure at any point in your compilation unit before you use the first I/O routine on that file. Because the RESET, REWRITE, and EXTEND procedures implicitly open files, you need not always use the OPEN procedure. RESET, REWRITE, and EXTEND impose the same defaults as OPEN, except where noted (in the HISTORY parameter). You must use the OPEN procedure to create a TEXT file with fixed-length components, to create a file with relative or indexed organization, to open a file for direct or keyed access, or to specify a line length other than the default for a line in a TEXT file. See the "Compaq Pascal Language Reference Manual" for the complete description of the OPEN procedure.
Additional Information (explode) :
|