[J3] Comments in list-directed input?

Bleikamp, Richard Richard.Bleikamp at amd.com
Thu Aug 4 18:28:29 UTC 2022

[AMD Official Use Only - General]

Hi Van,

A non-delimited character value, in list-directed input records, can currently be a single "!", or "!xxx" where "x"s are rep-chars.  "!" is a valid rep-char.  So, allowing a "!" to initiate a comment-to-end-of-line would introduce an incompatibility with Fortran 2018/...

If we were to introduce a new mode for list-directed input, where all character values were required to be delimited with ' or ", then we could easily support ! comments in those records.

Unless we were going to eventually obsolete list directed input of non-delimited character values, I wouldn't be thrilled with adding a new mode.


From: J3 <j3-bounces at mailman.j3-fortran.org> On Behalf Of Van Snyder via J3
Sent: Wednesday, August 3, 2022 11:54 PM
To: j3 <j3 at j3-fortran.org>
Cc: Van Snyder <van.snyder at sbcglobal.net>
Subject: [J3] Comments in list-directed input?

[CAUTION: External Email]
We allow comments in namelist input.

In list-directed input, one can put comments after the last item desired by putting them after the slash that terminates the input.

If one is reading several arrays, say one array per line, with one list-directed input statement, one cannot put a slash and comment on each line because that terminates the input.

Would there be a problem to allow comments in list-directed input, beginning with "!" as in namelist input?

Is this a tiny enough change to get added to the "really tiny stuff tacked onto the next standard outside the big projects" list?

As is the case with the slash, if one is reading a character variable, and not including quotes or apostrophes, you risk reading the comment.

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

More information about the J3 mailing list