Search code examples
fortranfortran77

Which Fortran 77 format specifiers will never be used for input?


Still working on making a fortran I/O for C#. My limited fortran experience doesn't help really, so I once again need some advice from experts.

I'm just concerned with Fortran 77 and data input at the moment. I will get around to data output later.

From this list of fortran edit descriptors, I have coded up I, F, E, D, G, L, A, '', Tn, TL, TR, and X so far for data input. Still need to take care of BN and BZ...

I am wondering if the rest of the symbols $, :, /, Sp, SS and S actually ever occur in format string for data input? I can imagine that / might if reading the data line is to be terminated early, but I don't see how the other could be useful.


Solution

  • $ isn't a valid Fortran 77 descriptor. It is used in extensions.

    : terminates format processing in the absence of further list items. It may make a difference in some corner cases where there are invalid format specifications for input following, but perhaps that's invalid regardless.

    / is certainly significant.

    "The SP, SS and S edit descriptors have no effect during the execution of an input statement." (F77 13.5.6 p3)

    (The apostrophe descriptor (character literal) isn't valid in a format specification for input anyway. I don't see P in your list. When it comes time for output and Fortran 77, don't forget H...)