11.6.2.2125 REFILL FILE EXT
Extend the execution semantics of 6.2.2125 REFILL with the following:
When the input source is a text file, attempt to read the next line from the text-input file. If successful, make the result the current input buffer, set >IN to zero, and return true. Otherwise return false.
See:
ContributeContributions
ruv [111] Ambiguous conditionsRequest for clarification2019-08-28 13:06:05
An excerpt from 11.3.3 Input source
A standard program shall not call
REPOSITION-FILE
on the fileid returned bySOURCE-ID
.
Is it correctly to say that an ambiguous condition exists if REPOSITION-FILE
is applied to fileid returned by SOURCE-ID?
Shouldn't the Standard also say that a standard program shall not change the state of the input source via other words like WRITE-FILE
, READ-FILE
, READ-LINE
, CLOSE-FILE
, etc?
This question is connected with REFILL
since the statement "attempt to read the next line from the text-input file" can create a wrong impression that READ-LINE
may be applied to fileid from SOURCE-ID
and REFILL
should take the next line correctly after that.