Software Archive
Read-only legacy content
17061 讨论

New edit descriptors in F90

Intel_C_Intel
员工
476 次查看
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 项奖励
1 回复
Steven_L_Intel1
476 次查看
The Good Doctor prescribes F0.n, where n is the number of fraction digits you want. For example, F0.3.

Steve
0 项奖励
回复