Re: File output buffer overrun?
- From: "N. Shamsundar" <shamsundar_at_@xxxxxx>
- Date: Wed, 19 Oct 2005 18:07:32 -0500
Units ("logical units") are small integers -- not file handles. The use of units in Fortran predates the concept of files and file systems, AFAIK.Sorry; I have not been clear at all. I am a C person by training, so when I say "standard output", what I really mean is the UNIT=6 standard file handle. The majority of the output of the program gets written to a file opened under this handle. Is that the correct terminology? Thanks so much for the responses.
By tradition, Unit-5 and Unit-6 were "preconnected" (read "assigned") to standard input and standard output (Unix terminology). In earlier days (1960-s) Unit-5 was usually assigned to the card reader and Unit-6 to the line printer. Two other commonly preconnected devices were the console keyboard and card punch; paper tape was also sometimes used this way. This type of "preconnection" was an implementation-specific extension to the language.
Once units 5 or 6 are explicitly used in an OPEN statement, however, their "preconnections" are severed and it no longer makes sense to talk about "standard input" and "standard output".
N. Shamsundar University of Houston .