From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0B7923851C20; Sat, 30 Jan 2021 04:30:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B7923851C20 From: "jvdelisle at charter dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/98825] Unexpected behavior of FORTRAN FORMAT expressions when suppressing new line with '$' Date: Sat, 30 Jan 2021 04:30:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jvdelisle at charter dot net X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2021 04:30:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98825 --- Comment #6 from Jerry DeLisle --- I found the DEC F77 reference. I wanted to capture this somewhere for futu= re reference: o MESSAGE: Extension to FORTRAN-77: nonstandard FORMAT statement item EXPLANATION: The following format field descriptors are extensions to FORTRAN-77: Descriptor Aspect ---------- ------ $ All forms A,L,I,F,E,G,D Default field width forms P Without scale factor and then: $ In a format specification, the dollar sign character ($) modifies the carriage control specified by the first character of the record. It only affects the files for which the 'FORTRAN' carriage control attribute is in effect. On U*X systems, it also affects files if 'LIST' is in effect. In an input statement, the $ descriptor is ignored. In an output statement, the following rules apply: - If the first character of the record is 0, 1, or ASCII NUL, the $ descriptor is ignored. - If the first character of the record is a space or plus sign (+), the $ descriptor suppresses carriage return (after printing the record). For terminal I/O, whenever trailing carriage return control is suppressed by the $ descriptor, a typed response follows output on the same line. I am working on it.=