![]() ![]() If FORM='UNFORMATTED', each record is preceded and terminated with an INTEGER*4 count, making each record 8 characters longer than normal. If FORM='PRINT', the file acts like a FORM='FORMATTED' file, except for interpretation of the column-1 characters on the output (blank = single space, 0 = double space, 1 = form feed, and = no advance). If FORM='FORMATTED', each record is terminated with a newline ( \n) character that is, each record actually has one extra character. If FORM is not, formatted transfer is assumed. For tapes, we recommend the TOPEN() routines because they are more reliable. If you build a file as direct, then you cannot access it as sequential.įiles do not have to be randomly accessible, in the sense that tty, pipes, and tapes can be used. The FORTRAN 77 Standard prohibits RECL for sequential access. If FORM='UNFORMATTED', the size of each transfer depends upon the data transferred. If FORM is not specified, unformatted transfer is assumed. ![]() If you build a file as sequential, then you cannot access it as direct. Only directly accessible files are allowed thus, tty, pipes, and magnetic tape are not allowed. ![]() ACCESS='DIRECT': RECL must also be given, since all I/O transfers are done in multiples of fixed-size records. This is an extension and can be applied only to disk files. This is for opening a file to append records to an existing sequential-access file. If ACCESS='APPEND': SEQUENTIAL and FILEOPT='EOF' are assumed. Possible values are: APPEND, DIRECT, or SEQUENTIAL. If a file is opened with STATUS='SCRATCH', a temporary file is created and opened. This error is not detected by the ERR = option, however, and the program does not terminate abnormally. If you open a file that is already open, but you specify a different unit, that is an error. If you open a unit that is already open, but you specify a different file name, it is as if you closed with the old file name before the open. To change any other parameters, you must close, then reopen the file. The only parameters you are allowed to change are BLANK ( NULL or ZERO) and FORM ( FORMATTED or PRINT). If you open a unit that is already open without specifying a file name (or with the previous file name), FORTRAN thinks you are reopening the file to change parameters. If the file name is not specified, a default name is created. An OPEN statement need not specify a file name. If u is first in the parameter list, then UNIT= can be omitted.įin is a character expression or * naming the file to open. U is an integer expression or an asterisk (*) that specifies the unit number. The following provides a detailed list of the OPEN specifier keywords: u The keywords can be specified in any order. The following table summarizes the OPEN specifiers: Table 4-3 OPEN Specifiers Existing files are never truncated on opening. The specifiers list slist can include one or more of the followingįILEOPT = fopt = act OPEN statement determines the type of file named, whether the connection specified is legal for the file type (for instance, DIRECT access is illegal for tape and tty devices), and allocates buffers for the connection if the file is on tape or if the subparameter FILEOPT= ' BUFFER= n' is specified. The OPEN statement can connect an existing external file to a unit, create a file and connect it to a unit, or change some specifiers of the connection. ![]()
0 Comments
Leave a Reply. |