[J3] Input/Output for enumerators

John Reid John.Reid at stfc.ac.uk
Wed Oct 13 08:38:35 UTC 2021


Malcolm,

Is there a good reason against having A format i/o of the enumerator 
names as the only i/o mechanism for now? This was the suggestion in US 
21 approved in Tokyo. Paper 18-256r1 was the reference used. It contains 
this paragraph

"Subgroup considers that the most usable form for i/o for an enumeration 
value is the name of the value.  Being a name, the A edit descriptor 
would be suitable for explicit formatting."

Cheers,

John.


Malcolm Cohen via J3 wrote:
>
> Hi Van,
>
> The G edit descriptor is not permitted for enumeration types, 
> precisely to avoid setting in concrete a solution that many would 
> disagree with. Only I, B, O and Z are permitted. This is specified in p7.
>
> Nor is list-directed editing permitted, for the same reason, and this 
> is also specified in p7.
>
> Nor is namelist editing permitted, for the same reason, and this is 
> specified in the NAMELIST subclause.
>
> There are no turds being introduced. (I note this is quite insulting.) 
> Instead, we have a smaller feature that we could get consensus on.
>
> There is as yet no consensus on the “right way” for other edit 
> descriptors, list-directed, and namelist. The feature is still useful, 
> even though it is smaller than we hoped in Tokyo.
>
> Refusing to accept a smaller feature for the time being would not so 
> much result in “do nothing”, as result in ripping out the useful 
> feature we’ve already put in. That really would not be an improvement.
>
> Cheers,
>
> -- 
>
> ..............Malcolm Cohen, NAG Oxford/Tokyo.
>
> *From:* J3 <j3-bounces at mailman.j3-fortran.org> *On Behalf Of *Van 
> Snyder via J3
> *Sent:* Tuesday, October 12, 2021 5:12 PM
> *To:* j3 at mailman.j3-fortran.org
> *Cc:* Van Snyder <van.snyder at sbcglobal.net>
> *Subject:* Re: [J3] Input/Output for enumerators
>
> On Tue, 2021-10-12 at 16:20 +0900, Malcolm Cohen via J3 wrote:
>
>     I do think that many/most of the committee would agree with you
>     that treating enumeration types only as integer is, in the
>     medium/long term, sub-optimal. I hope that we can get this sorted
>     out for the following revision (F202y).
>
> If it is possible to proceed with I/O for typed enumerators as 
> integers, and later to allow an A instead of I edit descriptor, the 
> half-measure strategy might be workable. The problem comes with the G 
> edit descriptor, list-directed editing, and namelist editing. Those 
> would be cast in concrete. The concrete might be weakened by promising 
> a changeable mode, either for all editing for typed enumerators, or to 
> specify whether I or A editing is used for G, list-directed, or 
> namelist I/O.
>
> The history of Fortran is replete with yielding to pressure to do a 
> half-way job to get "something," even if it's a half-measure that's 
> painted into a corner, resulting in an irreversable kludge. The 
> alternative is what has driven people away from Fortran: The language 
> advances slower than molasses in January.
>
> The choices seem to be
>
> 1. Do nothing
>
> 2. Do a half-measure, hoping to polish a turd later
>
> 3. Work harder.
>
> Will doing I/O for typed enumerators the right way, the first time, 
> actually sabotage the entire project?
>
> I poured 24 years into trying to work harder. I was frequently 
> thwarted. Reducing the work schedule from four meetings per year to 
> three didn't help anything. All I can do now is offer advice.
>
> *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.
>



More information about the J3 mailing list