[J3] [EXTERNAL] [BULK] Re: A couple more ideas for features

Dan Nagle danlnagle at mac.com
Fri Apr 7 14:55:35 UTC 2023


My $0.02

DO UNTIL, IIRC, was proposed because several compilers supported it.

I would vote against DO UNTIL now, at least as proposed,
because a DO loop is of the form

DO [loop-control]


and having s second home for [loop-control] doesn't seem helpful,
and might be a lot of work to get right.

The superior (IMNSHO) IF( exit-cond ) EXIT can be put anywhere
in the loop, including just before the END DO, or just after the DO.

I would deprecate DO WHILE on grounds of little use itself
and superior alternatives exist.  DO WHILE exists now only
to satisfy Mil. Std. 1753, which is written against f77,
and is therefore moot.

> On Apr 7, 2023, at 05:50, Clune, Thomas L. (GSFC-6101) via J3 <j3 at mailman.j3-fortran.org> wrote:
>   From: J3 <j3-bounces at mailman.j3-fortran.org> on behalf of j3 <j3 at mailman.j3-fortran.org>
> Reply-To: j3 <j3 at mailman.j3-fortran.org>
> Date: Thursday, April 6, 2023 at 8:43 PM
> To: j3 <j3 at mailman.j3-fortran.org>
> Cc: Malcolm Cohen <malcolm at nag-j.co.jp>
> Subject: [EXTERNAL] [BULK] Re: [J3] A couple more ideas for features
>   > But it is true that Fortran has a relative paucity of symbols that can be used as operators
>  Not so. Fortran has a much larger set than other languages viz the .lettersequence. form has over 26**63 variations that are available.  There are very few languages with more than 26**63 operators, and even fewer programs that could use that many.
>  Yes – I anticipated that response, but reasoned that others would understand the desire to have something looking a bit more like a concise symbol.      But I tend to agree that the existing wordy-forms are the “good-enough” that are the sufficient enemies of better/perfect.   There is even a counter argument against the concise mathematical symbols.   They tend to be “imbued” with meaning and can trip up unwary users when developers violate those assumptions.
> > The other request was for a DO … UNTIL(cond)  to complement  DO WHILE(cond) …      I have no doubt that this request has come up before, so someone can quickly rattle off why it was not pursued
>  It is subsumed by the more general DO with EXIT. DO WHILE was only added for conformance with the widely-implemented MIL standard.
>  It would hardly even save any typing!
>  Yes – I’ve not missed it myself.  But felt obligated to at least float the suggestion as I get so few feature requests from NASA users (outside my immediate colleagues).
>  Cheers,
>     • Tom
>  Cheers,
> --
> ..............Malcolm Cohen, NAG Oxford/Tokyo.


Dan Nagle

More information about the J3 mailing list