Also, the specifier may be a character constant, variable, or character expression. The FILE= specifier on an OPEN statement may specify a simple file name ( FILE='myfile.out') or a file name preceded by an absolute or relative directory path ( FILE='./Amber/Qproj/myfile.out'). See the Sun FORTRAN 77 Language Reference Manual for a full discussion of the OPEN statement. This file can be pre-existing or created by the program. The OPEN statement's FILE= specifier establishes the association of a logical unit to a named, physical file at runtime. Also, certain "preconnected " units are automatically associated with specific files at the start of program execution. The asterisk stands for standard input file when it appears in a READ statement it stands for standard output file when it appears in a WRITE or PRINT statement.Ī Fortran logical unit can be associated with a specific, named file through the OPEN statement. The character * can appear as a logical unit identifier. Logical units are identified in an I/O statement by a logical unit number, a nonnegative integer from 0 to the maximum 4-byte integer value (2,147,483,647). Accessing Files From Within Fortran Programsĭata is transferred between the program and devices or files through a Fortran logical unit. This chapter discusses the input/output features provided by Sun Fortran compilers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |