[J3] OUTPUT_UNIT

Malcolm Cohen malcolm at nag-j.co.jp
Wed Aug 4 01:24:05 UTC 2021


Hi Van,

 

Thanks for your comments.

 

> It also needs to be specified in 12.5.1p4.

 

Absolutely not. 12.5.1 is not relevant to the PRINT statement, as the print statement contains no unit id.

 

>Subclause 12.6.4.8.3p4 specifies indirectly that the unit specified by asterisk in a WRITE statement is the same as the unit used for a PRINT statement

 

Irrelevant (12.6.4.8 is for defined i/o, so not the right place to be looking...). 12.6.4.3 Identifying a unit specifies it directly (see below).

 

> The description of OUTPUT_UNIT needs to specify that this is the same unit as used in a PRINT statement.

 

It is specified directly in 12.6.4.3 that “The PRINT statement specifies some other processor-dependent unit, which is the same as the unit identified by * in a WRITE statement and is the same as the unit identified by the value of the named constant OUTPUT_UNIT of the intrinsic module ISO_FORTRAN_ENV (16.10.2.24).”

 

So I do not agree that it *needs* to be specified in 16 as well (i.e. there is no defect or omission in the standard).

 

Normally I’d not be in favour of specifying it twice, but especially since we specified it twice for INPUT_UNIT, there is a good case for specifying it here. I note it already has a cross-reference to 12.6.4.3 which is the real normative text for these things. Any mention of PRINT thus needs to come before the cross-ref to 12.6.4.3, the same as it does for INPUT_UNIT.

 

Cheers,

-- 

..............Malcolm Cohen, NAG Oxford/Tokyo.

 

From: J3 <j3-bounces at mailman.j3-fortran.org> On Behalf Of Van Snyder via J3
Sent: Wednesday, August 4, 2021 6:43 AM
To: j3 <j3 at j3-fortran.org>
Cc: Van Snyder <van.snyder at sbcglobal.net>
Subject: [J3] OUTPUT_UNIT

 

The description of OUTPUT_UNIT in 18-007r1:16.10.2.22 needs an addional sentence.

 

The description of INPUT_UNIT specifies that this is the same unit as used in a READ statement that does not specify a unit.

 

The description of OUTPUT_UNIT needs to specify that this is the same unit as used in a PRINT statement. Subclause 12.6.4.8.3p4 specifies indirectly that the unit specified by asterisk in a WRITE statement is the same as the unit used for a PRINT statement, but it needs to be in 16.10.2.22 as well.

 

It also needs to be specified in 12.5.1p4.

 

I'll write a paper.

 

Van

 

 

Disclaimer

The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: 30 St. Giles, Oxford, OX1 3LE, United Kingdom. Please see our Privacy Notice <https://www.nag.co.uk/content/privacy-notice>  for information on how we process personal data and for details of how to stop or limit communications from us.

This e-mail has been scanned for all viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20210804/aec665d9/attachment.htm>


More information about the J3 mailing list