[J3] Instead of += etc
Steve Lionel
steve at stevelionel.com
Thu Nov 1 19:38:59 EDT 2018
This topic came up again in a StackOverflow discussion. I agree that
explicit formats are simply unworkable here, but I think we could make
list-directed and NAMELIST work, and I'd like to see it worked on further.
Steve
On 11/1/2018 7:09 PM, Clive Page via J3 wrote:
> On 01/11/2018 20:56, Bill Long via J3 wrote:
>>
>>> On Nov 1, 2018, at 4:38 AM, Anton Shterenlikht via J3
>>> <j3 at mailman.j3-fortran.org> wrote:
>>> On the other hand, at the same meeting
>>> there was some angry reaction
>>> from the users on the J3 decision
>>> to reject auto (re)allocation on READ,
>>> despite it scoring high in N2147.
>>> The justification given in
>>> https://j3-fortran.org/doc/year/18/minutes215.txt
>>> was seen too harsh and dismissive by some:
>>>
>>> 18-135 "Use cases for unallocated list item in READ statement"
>>> This was broken out from allocatables in ERRMSG, IOMSG.
>>> Discussion items: Definite performance issue, as it
>>> would require double-reading. Appreciate the goal,
>>> but
>>> seems unrealistic. List directed could be a problem.
>>> Format reversion would be a problem. Simple would be
>>> valuable, but complicated could be very complicated
>>> SV: 0 - 8 - 4
>>>
>>> They wonder why a limited "simple” facility
>>
>> It is not clear what is meant by “simple” here.
>
> Well maybe I can try to answer this, as I was one of those supporting
> the feature and indeed, if I remember correctly, it was my question
> that started the discussion of the issue at the recent BCS Fortran
> meeting.
>
> I think what "simple" means is whatever it is that compiler-writers
> determine can be done without excessive effort. I can see that
> supporting format reversion and list-directed reads might add
> considerable complication, but not being a compiler-writer I have no
> idea really what's easy and what is hard. But I note that some
> existing I/O features have been introduced initially in a restricted
> form, which is better than nothing, and then the restrictions removed
> in a later standard. A trivial example: read with SIZE was originally
> only allowed if the read statement also contained ADVANCE="NO", but it
> has now been possible to remove that restriction. I'd have thought
> that if a read could be used with a scalar character variable of
> allocatable length in a formatted and not list-directed read without
> format reversion, and have its size set automatically, just as if that
> variable had been set in a scalar character assignment statement, that
> would still be seen as a useful facility.
>
> Regards
>
More information about the J3
mailing list