[J3] P edit descriptor and format reversion
Malcolm Cohen
malcolm at nag-j.co.jp
Tue Aug 18 20:24:37 EDT 2020
Hi Van,
It stays at its current value – the same is true of all the modes (e.g. rounding, padding, blank-interpretation, decimal) that are changed by edit descriptors.
The standard actually says this explictly, at 13.4p8 last sentence “This reversion of format control has no effect on the changeable modes”.
Cheers,
--
..............Malcolm Cohen, NAG Oxford/Tokyo.
From: J3 <j3-bounces at mailman.j3-fortran.org> On Behalf Of Van Snyder via J3
Sent: Wednesday, August 19, 2020 9:14 AM
To: j3 <j3 at j3-fortran.org>
Cc: Van Snyder <van.snyder at sbcglobal.net>
Subject: [J3] P edit descriptor and format reversion
I have
write ( *, '(f11.2,1pg15.7)' ) ( a(i), b(i), i = 1, n )
On the second line, a(2) is printed as if I had 1pf11.2.
I changed it to
write ( *, '(0pf11.2,1pg15.7)' ) ( a(i), b(i), i = 1, n )
and got the output I expected.
Does the "p" edit descriptor revert to zero when format reversion occurs, or is it stuck at its previous value?
Disclaimer
The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20200819/094e8068/attachment.htm>
More information about the J3
mailing list