[J3] Leading zeroes
Steve Lionel
steve at stevelionel.com
Sun Nov 4 20:19:56 EST 2018
I just received this from a long-time user I am familiar with.
Unfortunately I don't see a way to incorporate his request without
radical new syntax (F5.2.5 ?) or breaking existing code. (I also
referenced 18-268.)
Steve
Coordinating w/others has never been my strong suit, so watching
something this complex coalesce simply seems like magic to me… Perhaps
especially so because Fortran has been around for over 60 years, and
adding new capabilities while still honoring the original syntax /is/
magic (as some might think it impossible!).
I do see a lot on the table, so I suspect it will get tough when it
comes time to nail it down and /commit/ – as you’ve said before,
processor “vendors” cannot adopt everything at once so picking the
right-sized feature set for the next standard is a balancing act – add
too much and compilers will lag – too little and Fortran will suffer.
In short, Godspeed!
Re *J3/18-120r3*, a small suggestion. /Just now/ I was trying to
zero-pad a floating point number (with +/- sign), but I had to do
“string gymnastics” with 4-5 lines of code to make it happen. It’s not
much burden, and my use case is likely limited, but while your team
considers this “leading zero” issue in 18-120, perhaps there is a
generalization of the proposed format change that includes (real number)
zero-padding, similar to integer such as “I4.4”. In my case, I was in
need of 5 characters w/sign and leading zeros (e.g. “+01.14”, “-10.33”,
“-00.03”, “+00.94”), so I had to use “SP,F0.2” and then adjust the
resulting string.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20181104/456107b3/attachment.html>
More information about the J3
mailing list