NEW_LINE(A) (Fortran 2003)

Purpose

The NEW_LINE intrinsic returns a new line character.

Class

Inquiry function

Argument type and attributes

A
An INTENT(IN) character. The actual argument corresponding to A can be scalar or array.

Result type and attributes

Character scalar of length one.

Result value

The result is the same as ACHAR(10).

Examples

The following example uses the NEW_LINE intrinsic in list-directed output:
character(1) c
print *, 'The first sentence.', NEW_LINE(c), 'The second sentence.'
Expected Output:
The first sentence.
The second sentence.
The following example passes a character literal constant to the NEW_LINE intrinsic:
character(100)  line
line = 'IBM' // NEW_LINE('Fortran') // 'XL Fortran Compiler'
Expected Output:
IBM
XL Fortran Compiler