From bec93d793735ff33a75a0e77ba96e78dd4b01262 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Sun, 8 Oct 2006 15:21:42 +0200 Subject: 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 --- gcc/fortran/intrinsic.texi | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'gcc/fortran/intrinsic.texi') 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 -- cgit v1.1