[comp.lang.fortran] Fortran formatted I/O

bernhold@red8 (David E. Bernholdt) (06/03/91)

In article <RN.1280@mts.ucs.UAlberta.CA> userAKDU@mts.ucs.UAlberta.CA (Al Dunbar) writes:
>Seems odd that such simple everyday useful things [proposed new edit 
> descriptors] would be left changes to the language. out, while they did deal
>with much more complex and contentious

An anecdote about Fortran formatted I/O and edit descriptors:

I first learned Fortran in order to take a proficiency exam for an
Intro Fortran course in college.  I knew BASIC, Pascal, a little
assembler, and my advisor thought I should be able to just study up on
Fortran and take the test -- I knew how to program, I just needed to
learn the language.

I learned Fortran from Katzan's "Fortran77" (highly recommended by the
way, though I understand its out of print) in a few days and took the
exam having never written a line of real Fortran code in my life.  The
professor who graded the exams remarked that I was the only one who
used list-directed I/O.  She thought that was "interesting."  I didn't
tell her that it was because the formatted I/O had made _no_ sense to
me when I read about it.  I did well enough to pass the test.

Since then, I've done enough Fortran programming to more than make up
for any lack when I took that exam.  Though I now understand formatted
I/O, I still find it one of the most cumbersome and inhibitory (in
terms of getting the format you really want) aspects of the language.
-- 
David Bernholdt			bernhold@qtp.ufl.edu
Quantum Theory Project		bernhold@ufpine.bitnet
University of Florida
Gainesville, FL  32611		904/392 6365

mac@cis.ksu.edu (Myron A. Calhoun) (06/05/91)

In <28908@uflorida.cis.ufl.EDU> bernhold@red8 (David E. Bernholdt) writes:

>In article <RN.1280@mts.ucs.UAlberta.CA> userAKDU@mts.ucs.UAlberta.CA (Al Dunbar) writes:
>>Seems odd that such simple everyday useful things [proposed new edit 
>> descriptors] would be left changes to the language. out, while they did deal
>>with much more complex and contentious

>An anecdote about Fortran formatted I/O and edit descriptors:

    [many lines deleted]

>....  Though I now understand formatted
>I/O, I still find it one of the most cumbersome and inhibitory (in
>terms of getting the format you really want) aspects of the language.

Am I the only person in the world who thinks FORTRAN's FORMATs are
REALLY NICE, especially since they work on both input and output?
About the only extant language with better formatting is COBOL
(I don't consider PL/1 extant).  Pascal's formatting sucks.  So does
BASIC's "USING" statement.  C's "scanf" is not much better.  I'll
admit that FORTRAN's FORMAT does have an occasional limitation (such
as left-justified integers), but it can do almost everything else!
--Myron.
--
# Myron A. Calhoun, Ph.D. E.E.; Associate Professor   (913) 539-4448 home
#  INTERNET:  mac@cis.ksu.edu (129.130.10.2)                532-6350 work
#      UUCP:  ...rutgers!ksuvax1!harry!mac                  532-7353 fax
# AT&T Mail:  attmail!ksuvax1!mac                   W0PBV @ K0VAY.KS.USA.NA