Sun Studio 12: Fortran User's Guide

4.6.9 Fortran 2003 Formatted I/O Features

Three new Fortran 2003 formatted I/O specifiers have been implemented in f95. They may appear on OPEN, READ, WRITE, PRINT, and INQUIRE statements:

When used in INQUIRE statements, these specifiers declare a character variable for returning the current values.

New edit descriptors DP, DC, RP, and RC change the defaults within a single FORMAT statement to decimal point, decimal comma, processor-defined rounding, and compatible rounding respectively. For example:

WRITE(*,’(I5,DC,F10.3)’) N, W

prints a comma instead of a period in the F10.3 output item.

See also the -iorounding compiler command-line option for changing the floating-point rounding modes on formatted I/O. (3.4.49 –iorounding[={compatible|processor-defined}].)