wclodius@lanl.gov wrote:
>
> Andrew Swallow wrote:
>
>>Jan Vorbrüggen wrote:
>>
>>
>>>>Fortran 4 and 77 cannot handle interrupts or recursion. Its I/O and
>>>>character handling were very inefficient.
>>>
>>>
>>>For the latter two points, please explain why you think that is the case.
>>>
>>> Jan
>>
>>The FORMAT statement was interpreted at run time - that is a big
>>overhead. COBOL was used when you wanted efficient I/O.
>>
>>Andrew Swallow
>
> 1. The format applies only to text file output and internal IO
> (conversion to character strings). Its overhead does not matter for
> binary files.
>
> 2. If the format (statement or character string) is constant,
> particularly if it is locally accessible, it can be inlined, and
> several modern (and probably some older) compilers will inline (simpler
> formats only?) at some optimization settings. Those simpler formats
> probably match what you can do in Cobol.
>
Modern FORTRAN is very different from the FORTRAN 4 of 1966.
A lot of improvements have been made since the 1950s when FORTRAN
was invented. Early FORTRAN was however C's competitor.
> 3. I am not familiar with COBOL IO, but for many languages other than
> Fortran (C and C++) the specification of the conversion of other data
> types to character/string allows great flexibility that at times
> requires the equivalent of runtime interpretation. These languages have
> also been used in implementing systems.
>
> 4. Fortran IO does have it problems. Its runtime library is
> particularly large partly because of the variety of filetypes it has
> evolved over its lifetime, and partly because of the variety of special
> cases in its formatted IO. Its implementors often optimize for large
> data volumes, or emphasize binary output over formatted (text) files.
>
Andrew Swallow
Received on Thu Sep 29 21:38:41 2005