Van Snyder <[log in to unmask]> wrote:
...
>After you get the unit number for standard output from ISO_FORTRAN_ENV,
>you invoked "INQUIRE(unit=foo, opened=what)" to find out if its connected.
>I don't see that the draft F2K standard requires that the asterisk units
>exist, only that they have numbers.
Well, actually you have to invoke INQUIRE with EXIST=what first.
The unit may not exist. If it does exist, then it might still not be connected.
And that's what OPENED will tell you. Of course, you don't have to
do either of these tests if you're never planning to port to an implementation
that doesn't *always* preconnect the asterisk unit.
But, it seems to me redundant to have to do the INQUIRE on a value
provided by the ISO_FORTRAN_ENV module to see if the unit
exists. Whoever wrote the run-time support library (including the
ISO_FORTRAN_ENV module) already knows whether asterisk
is a supported unit or not. That information could be in the module.
This isn't a really important issue. Doing one extra INQUIRE is
not likely to be a real killer in space or speed. But, my first impression
of the proposed module was that it was requiring the asterisk unit
both to exist and to be preconnected - that is, people could expect
to use the unit and/or the unit numbers in the ISO_FORTRAN_ENV
*without* first testing with INQUIRE (or otherwise verifying that
the unit really existed). As a result of this discussion, I think it's
clear that's not the intent or the consequence of the proposal.
--
J. Giles
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|