Dang ternary operator. I wish ternary was "open":
X ? A : B : ... Z;
Where the value of each expression counted down from A..Z, ie, of there's 8 limbs, then A is 7, B is 6, ..., Z is 0.Sounds similar to computed GO TO, as in:
GO TO (LABEL1, LABEL2, LABEL3, LABEL4) I
https://docs.oracle.com/cd/E19957-01/805-4939/6j4m0vn9l/inde...you want a one-line switch expression??
Yes; not often, but, yes.
Re:Fortran 2023
by theodorethomas on Wednesday November 22, 2023 @11:13AM
(#38381137)
https://wg5-fortran.org/N2201-N2250/N2212.pdf is John Reid's complete document.
Which FOSS compilers support it?
flang [1], it's part of the LLVM project.
GFortran, Flang and LFortran are all open-source compilers that support modern Fortran.
If "it" is F'23, then none. GNU Fortran has had the "new" degree-unit trig functions for a while, but no compiler, FOSS or otherwise, has the newly invented features of this revision.
Fortran doesn't prototype features with real implementations (or test suites) before standardizing them, which had led to more than one problem over the years as ambiguities, contradictions, and omissions in the standard aren't discovered until years later when compiler developers eventually try to make sense of them, leading to lots of incomplete and incompatible implementations. I've written demonstrations for many examples and published them at https://github.com/klausler/fortran-wringer-tests/tree/main .
as a funny note John Reid was the singer of Nightcrawlers in the 90s.
More info, The Home of Fortran Standards: https://wg5-fortran.org/