J3/10-246r1
To: J3
From: Stan Whitlock/Malcolm Cohen
Subject: F03/0096 Can a read statement change the unit value?
Date: 2010 October 14
----------------------------------------------------------------------
NUMBER: F03/0096
TITLE: Can a read statement change the unit value?
KEYWORDS: Read statement, unit value
DEFECT TYPE: Erratum
STATUS: J3 consideration in progress
QUESTION:
Is it allowed to change the value of a variable which supplies the
unit number to an read statement?
10-007 [243:3-5] says the value of any input/output specifier shall not
depend on any input-item. UNIT= is a specifier in a READ statement.
Note 9.40 on page 221 gives the example
READ(N) N, X(N)
and discusses how the changes to N work.
ANSWER:
Yes, the example was intended to be allowed as long as N is not an
internal unit. Edits will limit the restriction to "output items"
n the specifier list and the Format.
EDITS: In 10-007
In 9.12, paragraph 5,
[243:3-4]
Delete "on any , , or",
Making that sentence read:
"The value of a specifier in an input/output statement shall not
depend on the definition or evaluation of any other specifier in
the or in that
statement."
[243:5] Append new sentence to paragraph
"The value of an or of a FMT=, ID=, IOMSG=,
IOSTAT= or SIZE= specifier shall not depend on any or
."
SUBMITTED BY: Dick Hendrickson
HISTORY: 07-266 m181 F03/0096 submitted
07-266r1 m181 Draft answer - withdrawn, no reason, no vote
10-246 m193 Draft answer for F2008
10-246r1 m193 Revised edit.
----------------------------------------------------------------------