Software Archive
Read-only legacy content
17061 Discussions

New edit descriptors in F90

Intel_C_Intel
Employee
334 Views
In an article by Dr. Fortran (aka. Steve), the following new capabilites in F95 were described:

Zero width for integer and real editing - F95 added a nifty new feature, the ability to specify a field width of zero for integer output editing (I, B, O, Z descriptors) and real output editing (F descriptor.) If zero is specified, "the processor selects the field width", which typically means that the width is just enough to display the actual significant digits.

The example showed output for an A and I edit descriptor, but none for the F descriptor. Does anyone know how one does this for reals? Do you specify F0, F0.0, or what? I have tried both ways and no luck. I have also checked the help files, but there is no mention of this capability nor is an example provided. I have just found Steve's brief mention that it can be done. This capability would be extremely helpful for output where I can potentially get *********** in some cases.

Tom
0 Kudos
1 Reply
Steven_L_Intel1
Employee
334 Views
The Good Doctor prescribes F0.n, where n is the number of fraction digits you want. For example, F0.3.

Steve
0 Kudos
Reply