print(7f) - [IO] write formatted sequential I/O to stdout
PRINT format [ , output-item-list ]
print(7f) is equivalent to
write(*,fmt=FORMAT_SPECIFIER) LISTThat is, it always writes formatted sequential I/O to stdout. It may use list-directed I/O or a FORMAT specifier.
print(7f) allows for no other options and therefore cannot be used for binary or non-advancing or stream or asynchronous I/O or any of the other options provided by the more general but also more complicated write(7f) statement.
Note that pure subprograms cannot contain I/O statements such as print(7f).
format a format may be used to specify how output items are displayed using the many Fortran format descriptors, or an asterisk (*) may be used to indicate to use list-directed default formatting. output-item-list the variables whose values are to be displayed
A simple example program:
program demo_print implicit none real :: a=11.11, s=sqrt(12.0) integer :: j=753210 character(len=*),parameter :: commas=(*(g0:,","))Results:! List-directed output is frequently specified PRINT *, A, S
! a format may be placed on the print(7f) statement PRINT (*(g0,1x)), A, S, J
! the format may be in a character variable print commas, a, s, j
! or may be in a labeled format statement PRINT 10, A, S, J 10 FORMAT (2E16.3,1x,I0)
end program demo_print
> 11.1099997 3.46410155 > 11.1099997 3.46410155 753210 > 11.1099997,3.46410155,753210 > 0.111E+02 0.346E+01 753210
Fortran intrinsic descriptions (license: MIT) @urbanjost
o BACKSPACE(7) o CLOSE(7) o ENDFILE(7) o FLUSH(7) o INQUIRE(7) o OPEN(7) o PRINT(7) o READ(7) o REWIND(7) o WAIT(7) o WRITE(7)
Nemo Release 3.1 | print (7fortran) | November 02, 2024 |