User account creation filtered due to spam.
Currently, gfortran does not support the NEW_LINE intrinsic.
Expected: It is supported.
WRITE(*,'(A)') 'This is record 1.'//NEW_LINE('A')//'This is record 2.'
end program newline
From Fortran 2003 standard:
13.7.85 NEW LINE (A)
Description. Returns a newline character.
Class. Inquiry function.
Argument. A shall be of type character. It may be a scalar or an array.
Result Characteristics. Character scalar of length one with the same kind type parameter as A.
Case (i): If A is of the default character type and the character in position of the ASCII collating sequence is representable in the default character set, then the result is ACHAR(10).
Case (ii): If A is of the ASCII character type or the ISO 10646 character type, then the result is CHAR(10,KIND(A)).
Case (iii): Otherwise, the result is a processor-dependent character that represents a new line in output to files connected for formatted stream output if there is such a character.
Case (iv): Otherwise, the result is the blank character.
Subject: Bug 28585
Date: Sun Oct 8 13:21:42 2006
New Revision: 117555
* intrinsic.c (add_functions): Add new_line Fortran 2003 intrinsic.
* intrinsic.h: Add gfc_simplify_new_line and gfc_check_new_line
* check.c (gfc_check_new_line): New function.
* simplify.c (gfc_simplify_new_line): New function.
* intrinsic.texi: Document new_line intrinsic.
* gfortran.dg/new_line.f90: New test.
Fixed in 4.2 and later, thanks to Tobias.