[J3] WRITE statement with newline character at the end of each record.
Daniel Chen
cdchen at ca.ibm.com
Tue Jul 22 23:59:21 UTC 2025
Thanks Steve!
I messed up the newline with slash edit descriptor in my original post.
The addition of the colon indeed made the test code pass with other compilers that would otherwise fail.
Daniel
From: J3 <j3-bounces at mailman.j3-fortran.org> on behalf of Steve Lionel via J3 <j3 at mailman.j3-fortran.org>
Date: Tuesday, July 22, 2025 at 5:25 PM
To: j3 at mailman.j3-fortran.org <j3 at mailman.j3-fortran.org>
Cc: Steve Lionel <steve at stevelionel.com>
Subject: [EXTERNAL] Re: [J3] WRITE statement with newline character at the end of each record.
On 7/22/2025 4:12 PM, Daniel Chen via J3 wrote:
> Most of the compilers that I have access to failed at the runtime
> complaining over stepping internal files.
> It seems it is due to that each record has a newline character, which
> brings the pointer to the next line after the last record.
I'm not seeing any newline character, nor is there allowed to be one in
internal writes like this. What I do see is that after the 10th record,
the slash edit descriptor is processed and that creates an 11th record,
which doesn't exist. Putting a colon before the slash, to stop
processing if there are no more I/O list items, solves that. This looks
like the correct behavior to me.
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20250722/4f4f6cb0/attachment.htm>
More information about the J3
mailing list