aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/intrinsic.texi
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2006-10-08 15:21:42 +0200
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2006-10-08 13:21:42 +0000
commitbec93d793735ff33a75a0e77ba96e78dd4b01262 (patch)
tree4454e84128bde146be79c1a71c6c353d05b947ae /gcc/fortran/intrinsic.texi
parent3ac25120de29ce52ab034ba79612657f8c9cdfbe (diff)
downloadgcc-bec93d793735ff33a75a0e77ba96e78dd4b01262.zip
gcc-bec93d793735ff33a75a0e77ba96e78dd4b01262.tar.gz
gcc-bec93d793735ff33a75a0e77ba96e78dd4b01262.tar.bz2
re PR fortran/28585 (Fortran 2003: Support NEW_LINE intrinsic)
PR fortran/28585 * intrinsic.c (add_functions): Add new_line Fortran 2003 intrinsic. * intrinsic.h: Add gfc_simplify_new_line and gfc_check_new_line prototypes. * 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. From-SVN: r117555
Diffstat (limited to 'gcc/fortran/intrinsic.texi')
-rw-r--r--gcc/fortran/intrinsic.texi40
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi
index e3d8cc8..ebb5e53 100644
--- a/gcc/fortran/intrinsic.texi
+++ b/gcc/fortran/intrinsic.texi
@@ -183,6 +183,7 @@ Some intrinsics have documentation yet to be completed as indicated by 'document
* @code{MODULO}: MODULO, Modulo function
* @code{MVBITS}: MVBITS, Move bits from one integer to another
* @code{NEAREST}: NEAREST, Nearest representable number
+* @code{NEW_LINE}: NEW_LINE, New line character
* @code{NINT}: NINT, Nearest whole number
* @code{NOT}: NOT, Logical negation
* @code{NULL}: NULL, Function that returns an disassociated pointer
@@ -5879,6 +5880,45 @@ end program test_nearest
+@node NEW_LINE
+@section @code{NEW_LINE} --- New line character
+@findex @code{NEW_LINE} intrinsic
+@findex @code{NEW_LINE} intrinsic
+
+@table @asis
+@item @emph{Description}:
+@code{NEW_LINE(C)} returns the new-line character
+
+@item @emph{Standard}:
+F2003 and later
+
+@item @emph{Class}:
+Elemental function
+
+@item @emph{Syntax}:
+@code{C = NEW_LINE(C)}
+
+@item @emph{Arguments}:
+@multitable @columnfractions .15 .80
+@item @var{C} @tab The argument shall be a scalar or array of the
+ type @code{CHARACTER}.
+@end multitable
+
+@item @emph{Return value}:
+Returns a @var{CHARACTER} scalar of length one with the new-line character of
+the same kind as parameter @var{C}.
+
+@item @emph{Example}:
+@smallexample
+program newline
+ implicit none
+ write(*,'(A)') 'This is record 1.'//NEW_LINE('A')//'This is record 2.'
+end program newline
+@end smallexample
+@end table
+
+
+
@node NINT
@section @code{NINT} --- Nearest whole number
@findex @code{NINT} intrinsic