[Next] [Up] [Previous]

The OPEN Statement

The OPEN statement has the form

       OPEN filename,device,modifier,modifier...

where filename is a character string, device an integer expression (usually a constant), and the modifiers are ERR=statement-number, STATUS= one of the following possibilities:

    'OLD'        open an existing file
    'NEW'        create a new file, then open it
    'SCRATCH' or
    'TEMP'       create a new file, open it, and delete it upon
                 closing

or ACCESS='READ' or ACCESS='WRITE', and BLANK=' ' or BLANK=%TD0(0).

Also, note that filename may be a device name; how this is indicated ('LPT1:' or '*PRINT*') depends on your installation.

Where no STATUS modifier appears, an existing file is opened if present, otherwise a new permanent one is created. Files to be deleted at end of job, rather than end of program, should be created as permanent from your program's point of view, where some syntactic measure indicates their later deletion to the operating system.

Normally, FALCON programs, like FORTRAN programs, just handle files by logical I/O unit numbers (the device numbers in most I/O statements), and it is assumed that files are assigned to these numbers when the program is invoked. However, explicit file control can be useful for many applications.


[Next] [Up] [Previous]