2005-06-28 Paul Brook <paul@codesourcery.com>
[official-gcc.git] / gcc / fortran / intrinsic.texi
bloba524885630060c5450cacced720ee5100d95df2b
1 @ignore
2 Copyright (C) 2005
3 Free Software Foundation, Inc.
4 This is part of the GFORTRAN manual.   
5 For copying conditions, see the file gfortran.texi.
7 Permission is granted to copy, distribute and/or modify this document
8 under the terms of the GNU Free Documentation License, Version 1.2 or
9 any later version published by the Free Software Foundation; with the
10 Invariant Sections being ``GNU General Public License'' and ``Funding
11 Free Software'', the Front-Cover texts being (a) (see below), and with
12 the Back-Cover Texts being (b) (see below).  A copy of the license is
13 included in the gfdl(7) man page.
16 Some basic guidelines for editing this document:
18   (1) The intrinsic procedures are to be listed in alphabetical order.
19   (2) The generic name is to be use.
20   (3) The specific names are included in the function index and in a
21       table at the end of the node (See ABS entry).
22   (4) Try to maintain the same style for each entry.
25 @end ignore
27 @node Intrinsic Procedures
28 @chapter Intrinsic Procedures
29 @cindex Intrinsic Procedures
31 This portion of the document is incomplete and undergoing massive expansion 
32 and editing.  All contributions and corrections are strongly encouraged. 
34 @menu
35 * Introduction:         Introduction
36 * @code{ABORT}:         ABORT,     Abort the program     
37 * @code{ABS}:           ABS,       Absolute value     
38 * @code{ACHAR}:         ACHAR,     Character in @acronym{ASCII} collating sequence
39 * @code{ACOS}:          ACOS,      Arc cosine function
40 * @code{ADJUSTL}:       ADJUSTL,   Left adjust a string
41 * @code{ADJUSTR}:       ADJUSTR,   Right adjust a string
42 * @code{AIMAG}:         AIMAG,     Imaginary part of complex number
43 * @code{AINT}:          AINT,      Truncate to a whole number
44 * @code{ALL}:           ALL,       Determine if all values are true
45 * @code{ALLOCATED}:     ALLOCATED, Status of allocatable entity
46 * @code{ANINT}:         ANINT,     Nearest whole number
47 * @code{ANY}:           ANY,       Determine if any values are true
48 * @code{ASIN}:          ASIN,      Arcsine function
49 * @code{ASSOCIATED}:    ASSOCIATED, Status of a pointer or pointer/target pair
50 * @code{ATAN}:          ATAN,      Arctangent function
51 * @code{ATAN2}:         ATAN2,     Arctangent function
52 * @code{BESJ0}:         BESJ0,     Bessel function of the first kind of order 0
53 * @code{BESJ1}:         BESJ1,     Bessel function of the first kind of order 1
54 * @code{BESJN}:         BESJN,     Bessel function of the first kind
55 * @code{BESY0}:         BESY0,     Bessel function of the second kind of order 0
56 * @code{BESY1}:         BESY1,     Bessel function of the second kind of order 1
57 * @code{BESYN}:         BESYN,     Bessel function of the second kind
58 * @code{BIT_SIZE}:      BIT_SIZE,  Bit size inquiry function
59 * @code{BTEST}:         BTEST,     Bit test function
60 * @code{CEILING}:       CEILING,   Integer ceiling function
61 * @code{CHAR}:          CHAR,      Character conversion function
62 * @code{CMPLX}:         CMPLX,     Complex conversion function
63 * @code{COMMAND_ARGUMENT_COUNT}: COMMAND_ARGUMENT_COUNT,  Command line argument count
64 * @code{CONJG}:         CONJG,     Complex conjugate function
65 * @code{COS}:           COS,       Cosine function
66 * @code{COSH}:          COSH,      Hyperbolic cosine function
67 * @code{COUNT}:         COUNT,     Count occurences of .TRUE. in an array
68 * @code{CPU_TIME}:      CPU_TIME,  CPU time subroutine
69 * @code{CSHIFT}:        CSHIFT,    Circular array shift function
70 * @code{DATE_AND_TIME}: DATE_AND_TIME, Date and time subroutine
71 * @code{DBLE}:          DBLE,      Double precision conversion function
72 * @code{DCMPLX}:        DCMPLX,    Double complex conversion function
73 * @code{DFLOAT}:        DFLOAT,    Double precision conversion function
74 * @code{DIGITS}:        DIGITS,    Significant digits function
75 * @code{DIM}:           DIM,       Dim function
76 * @code{DOT_PRODUCT}:   DOT_PRODUCT, Dot product function
77 * @code{DPROD}:         DPROD,     Double product function
78 * @code{DREAL}:         DREAL,     Double real part function
79 * @code{DTIME}:         DTIME,     Execution time subroutine (or function)
80 * @code{ERF}:           ERF,       Error function
81 * @code{ERFC}:          ERFC,      Complementary error function
82 * @code{EXP}:           EXP,       Cosine function
83 * @code{LOG}:           LOG,       Logarithm function
84 * @code{LOG10}:         LOG10,     Base 10 logarithm function 
85 * @code{SQRT}:          SQRT,      Square-root function
86 * @code{SIN}:           SIN,       Sine function
87 * @code{SINH}:          SINH,      Hyperbolic sine function
88 * @code{TAN}:           TAN,       Tangent function
89 * @code{TANH}:          TANH,      Hyperbolic tangent function
90 @end menu
92 @node Introduction
93 @section Introduction to intrinsic procedures
95 Gfortran provides a rich set of intrinsic procedures that includes all
96 the intrinsic procedures required by the Fortran 95 standard, a set of
97 intrinsic procedures for backwards compatibility with Gnu Fortran 77
98 (i.e., @command{g77}), and a small selection of intrinsic procedures
99 from the Fortran 2003 standard.  Any description here, which conflicts with a 
100 description in either the Fortran 95 standard or the Fortran 2003 standard,
101 is unintentional and the standard(s) should be considered authoritative.
103 The enumeration of the @code{KIND} type parameter is processor defined in
104 the Fortran 95 standard.  Gfortran defines the default integer type and
105 default real type by @code{INTEGER(KIND=4)} and @code{REAL(KIND=4)},
106 respectively.  The standard mandates that both data types shall have
107 another kind, which have more precision.  On typical target architectures
108 supported by @command{gfortran}, this kind type parameter is @code{KIND=8}.
109 Hence, @code{REAL(KIND=8)} and @code{DOUBLE PRECISION} are equivalent.
110 In the description of generic intrinsic procedures, the kind type parameter
111 will be specified by @code{KIND=*}, and in the description of specific
112 names for an intrinsic procedure the kind type parameter will be explicitly
113 given (e.g., @code{REAL(KIND=4)} or @code{REAL(KIND=8)}).  Finally, for
114 brevity the optional @code{KIND=} syntax will be omitted.
116 Many of the intrinsics procedures take one or more optional arguments.
117 This document follows the convention used in the Fortran 95 standard,
118 and denotes such arguments by square brackets.
120 @command{Gfortran} offers the @option{-std=f95} and @option{-std=gnu} options,
121 which can be used to restrict the set of intrinsic procedures to a 
122 given standard.  By default, @command{gfortran} sets the @option{-std=gnu}
123 option, and so all intrinsic procedures described here are accepted.  There
124 is one caveat.  For a select group of intrinsic procedures, @command{g77}
125 implemented both a function and a subroutine.  Both classes 
126 have been implemented in @command{gfortran} for backwards compatibility
127 with @command{g77}.  It is noted here that these functions and subroutines
128 cannot be intermixed in a given subprogram.  In the descriptions that follow,
129 the applicable option(s) is noted.
133 @node ABORT
134 @section @code{ABORT} --- Abort the program  
135 @findex @code{ABORT}
136 @cindex abort
138 @table @asis
139 @item @emph{Description}:
140 @code{ABORT} causes immediate termination of the program.  On operating
141 systems that support a core dump, @code{ABORT} will produce a core dump,
142 which is suitable for debugging purposes.
144 @item @emph{Option}:
147 @item @emph{Class}:
148 non-elemental subroutine
150 @item @emph{Syntax}:
151 @code{CALL ABORT}
153 @item @emph{Return value}:
154 Does not return.
156 @item @emph{Example}:
157 @smallexample
158 program test_abort
159   integer :: i = 1, j = 2
160   if (i /= j) call abort
161 end program test_abort
162 @end smallexample
163 @end table
167 @node ABS
168 @section @code{ABS} --- Absolute value  
169 @findex @code{ABS} intrinsic
170 @findex @code{CABS} intrinsic
171 @findex @code{DABS} intrinsic
172 @findex @code{IABS} intrinsic
173 @findex @code{ZABS} intrinsic
174 @findex @code{CDABS} intrinsic
175 @cindex absolute value
177 @table @asis
178 @item @emph{Description}:
179 @code{ABS(X)} computes the absolute value of @code{X}.
181 @item @emph{Option}:
182 f95, gnu
184 @item @emph{Class}:
185 elemental function
187 @item @emph{Syntax}:
188 @code{X = ABS(X)}
190 @item @emph{Arguments}:
191 @multitable @columnfractions .15 .80
192 @item @var{X} @tab The type of the argument shall be an @code{INTEGER(*)},
193 @code{REAL(*)}, or @code{COMPLEX(*)}.
194 @end multitable
196 @item @emph{Return value}:
197 The return value is of the same type and
198 kind as the argument except the return value is @code{REAL(*)} for a
199 @code{COMPLEX(*)} argument.
201 @item @emph{Example}:
202 @smallexample
203 program test_abs
204   integer :: i = -1
205   real :: x = -1.e0
206   complex :: z = (-1.e0,0.e0)
207   i = abs(i)
208   x = abs(x)
209   x = abs(z)
210 end program test_abs
211 @end smallexample
213 @item @emph{Specific names}:
214 @multitable @columnfractions .24 .24 .24 .24
215 @item Name            @tab Argument            @tab Return type       @tab Option
216 @item @code{CABS(Z)}  @tab @code{COMPLEX(4) Z} @tab @code{REAL(4)}    @tab f95, gnu
217 @item @code{DABS(X)}  @tab @code{REAL(8)    X} @tab @code{REAL(8)}    @tab f95, gnu
218 @item @code{IABS(I)}  @tab @code{INTEGER(4) I} @tab @code{INTEGER(4)} @tab f95, gnu
219 @item @code{ZABS(Z)}  @tab @code{COMPLEX(8) Z} @tab @code{COMPLEX(8)} @tab gnu
220 @item @code{CDABS(Z)} @tab @code{COMPLEX(8) Z} @tab @code{COMPLEX(8)} @tab gnu
221 @end multitable
222 @end table
226 @node ACHAR
227 @section @code{ACHAR} --- Character in @acronym{ASCII} collating sequence 
228 @findex @code{ACHAR} intrinsic
229 @cindex @acronym{ASCII} collating sequence
231 @table @asis
232 @item @emph{Description}:
233 @code{ACHAR(I)} returns the character located at position @code{I}
234 in the @acronym{ASCII} collating sequence.
236 @item @emph{Option}:
237 f95, gnu
239 @item @emph{Class}:
240 elemental function
242 @item @emph{Syntax}:
243 @code{C = ACHAR(I)}
245 @item @emph{Arguments}:
246 @multitable @columnfractions .15 .80
247 @item @var{I} @tab The type shall be @code{INTEGER(*)}.
248 @end multitable
250 @item @emph{Return value}:
251 The return value is of type @code{CHARACTER} with a length of one.  The
252 kind type parameter is the same as  @code{KIND('A')}.
254 @item @emph{Example}:
255 @smallexample
256 program test_achar
257   character c
258   c = achar(32)
259 end program test_achar
260 @end smallexample
261 @end table
265 @node ACOS
266 @section @code{ACOS} --- Arc cosine function 
267 @findex @code{ACOS} intrinsic
268 @findex @code{DACOS} intrinsic
269 @cindex arc cosine
271 @table @asis
272 @item @emph{Description}:
273 @code{ACOS(X)} computes the arc cosine of @var{X}.
275 @item @emph{Option}:
276 f95, gnu
278 @item @emph{Class}:
279 elemental function
281 @item @emph{Syntax}:
282 @code{X = ACOS(X)}
284 @item @emph{Arguments}:
285 @multitable @columnfractions .15 .80
286 @item @var{X} @tab The type shall be @code{REAL(*)} with a magnitude that is
287 less than one.
288 @end multitable
290 @item @emph{Return value}:
291 The return value is of type @code{REAL(*)} and it lies in the
292 range @math{ 0 \leq \arccos (x) \leq \pi}.  The kind type
293 parameter is the same as @var{X}.
295 @item @emph{Example}:
296 @smallexample
297 program test_acos
298   real(8) :: x = 0.866_8
299   x = achar(x)
300 end program test_acos
301 @end smallexample
303 @item @emph{Specific names}:
304 @multitable @columnfractions .24 .24 .24 .24
305 @item Name            @tab Argument          @tab Return type       @tab Option
306 @item @code{DACOS(X)} @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab f95, gnu
307 @end multitable
308 @end table
312 @node ADJUSTL
313 @section @code{ADJUSTL} --- Left adjust a string 
314 @findex @code{ADJUSTL} intrinsic
315 @cindex adjust string
317 @table @asis
318 @item @emph{Description}:
319 @code{ADJUSTL(STR)} will left adjust a string by removing leading spaces.
320 Spaces are inserted at the end of the string as needed.
322 @item @emph{Option}:
323 f95, gnu
325 @item @emph{Class}:
326 elemental function
328 @item @emph{Syntax}:
329 @code{STR = ADJUSTL(STR)}
331 @item @emph{Arguments}:
332 @multitable @columnfractions .15 .80
333 @item @var{STR} @tab The type shall be @code{CHARACTER}.
334 @end multitable
336 @item @emph{Return value}:
337 The return value is of type @code{CHARACTER} where leading spaces 
338 are removed and the same number of spaces are inserted on the end
339 of @var{STR}.
341 @item @emph{Example}:
342 @smallexample
343 program test_adjustl
344   character(len=20) :: str = '   gfortran'
345   str = adjustl(str)
346   print *, str
347 end program test_adjustl
348 @end smallexample
349 @end table
353 @node ADJUSTR
354 @section @code{ADJUSTR} --- Right adjust a string 
355 @findex @code{ADJUSTR} intrinsic
356 @cindex adjust string
358 @table @asis
359 @item @emph{Description}:
360 @code{ADJUSTR(STR)} will right adjust a string by removing trailing spaces.
361 Spaces are inserted at the start of the string as needed.
363 @item @emph{Option}:
364 f95, gnu
366 @item @emph{Class}:
367 elemental function
369 @item @emph{Syntax}:
370 @code{STR = ADJUSTR(STR)}
372 @item @emph{Arguments}:
373 @multitable @columnfractions .15 .80
374 @item @var{STR} @tab The type shall be @code{CHARACTER}.
375 @end multitable
377 @item @emph{Return value}:
378 The return value is of type @code{CHARACTER} where trailing spaces 
379 are removed and the same number of spaces are inserted at the start
380 of @var{STR}.
382 @item @emph{Example}:
383 @smallexample
384 program test_adjustr
385   character(len=20) :: str = 'gfortran'
386   str = adjustr(str)
387   print *, str
388 end program test_adjustr
389 @end smallexample
390 @end table
394 @node AIMAG
395 @section @code{AIMAG} --- Imaginary part of complex number  
396 @findex @code{AIMAG} intrinsic
397 @findex @code{DIMAG} intrinsic
398 @cindex Imaginary part
400 @table @asis
401 @item @emph{Description}:
402 @code{AIMAG(Z)} yields the imaginary part of complex argument @code{Z}.
404 @item @emph{Option}:
405 f95, gnu
407 @item @emph{Class}:
408 elemental function
410 @item @emph{Syntax}:
411 @code{X = AIMAG(Z)}
413 @item @emph{Arguments}:
414 @multitable @columnfractions .15 .80
415 @item @var{Z} @tab The type of the argument shall be @code{COMPLEX(*)}.
416 @end multitable
418 @item @emph{Return value}:
419 The return value is of type real with the
420 kind type parameter of the argument.
422 @item @emph{Example}:
423 @smallexample
424 program test_aimag
425   complex(4) z4
426   complex(8) z8
427   z4 = cmplx(1.e0_4, 0.e0_4)
428   z8 = cmplx(0.e0_8, 1.e0_8)
429   print *, aimag(z4), dimag(z8)
430 end program test_aimag
431 @end smallexample
433 @item @emph{Specific names}:
434 @multitable @columnfractions .24 .24 .24 .24
435 @item Name            @tab Argument            @tab Return type       @tab Option
436 @item @code{DIMAG(Z)} @tab @code{COMPLEX(8) Z} @tab @code{REAL(8)}    @tab f95, gnu
437 @end multitable
438 @end table
442 @node AINT
443 @section @code{AINT} --- Imaginary part of complex number  
444 @findex @code{AINT} intrinsic
445 @findex @code{DINT} intrinsic
446 @cindex whole number
448 @table @asis
449 @item @emph{Description}:
450 @code{AINT(X [, KIND])} truncates its argument to a whole number.
452 @item @emph{Option}:
453 f95, gnu
455 @item @emph{Class}:
456 elemental function
458 @item @emph{Syntax}:
459 @code{X = AINT(X)} 
460 @code{X = AINT(X, KIND)}
462 @item @emph{Arguments}:
463 @multitable @columnfractions .15 .80
464 @item @var{X}    @tab The type of the argument shall be @code{REAL(*)}.
465 @item @var{KIND} @tab (Optional) @var{KIND} shall be a scalar integer
466 initialization expression.
467 @end multitable
469 @item @emph{Return value}:
470 The return value is of type real with the kind type parameter of the
471 argument if the optional @var{KIND} is absent; otherwise, the kind
472 type parameter will be given by @var{KIND}.  If the magnitude of 
473 @var{X} is less than one, then @code{AINT(X)} returns zero.  If the
474 magnitude is equal to or greater than one, then it returns the largest
475 whole number that does not exceed its magnitude.  The sign is the same
476 as the sign of @var{X}. 
478 @item @emph{Example}:
479 @smallexample
480 program test_aint
481   real(4) x4
482   real(8) x8
483   x4 = 1.234E0_4
484   x8 = 4.321_8
485   print *, aint(x4), dint(x8)
486   x8 = aint(x4,8)
487 end program test_aint
488 @end smallexample
490 @item @emph{Specific names}:
491 @multitable @columnfractions .24 .24 .24 .24
492 @item Name           @tab Argument         @tab Return type      @tab Option
493 @item @code{DINT(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)}   @tab f95, gnu
494 @end multitable
495 @end table
499 @node ALL
500 @section @code{ALL} --- All values in @var{MASK} along @var{DIM} are true 
501 @findex @code{ALL} intrinsic
502 @cindex true values
504 @table @asis
505 @item @emph{Description}:
506 @code{ALL(MASK [, DIM])} determines if all the values are true in @var{MASK}
507 in the array along dimension @var{DIM}.
509 @item @emph{Option}:
510 f95, gnu
512 @item @emph{Class}:
513 transformational function
515 @item @emph{Syntax}:
516 @code{L = ALL(MASK)} 
517 @code{L = ALL(MASK, DIM)}
519 @item @emph{Arguments}:
520 @multitable @columnfractions .15 .80
521 @item @var{MASK} @tab The type of the argument shall be @code{LOGICAL(*)} and
522 it shall not be scalar.
523 @item @var{DIM}  @tab (Optional) @var{DIM} shall be a scalar integer
524 with a value that lies between one and the rank of @var{MASK}.
525 @end multitable
527 @item @emph{Return value}:
528 @code{ALL(MASK)} returns a scalar value of type @code{LOGICAL(*)} where
529 the kind type parameter is the same as the kind type parameter of
530 @var{MASK}.  If @var{DIM} is present, then @code{ALL(MASK, DIM)} returns
531 an array with the rank of @var{MASK} minus 1.  The shape is determined from
532 the shape of @var{MASK} where the @var{DIM} dimension is elided. 
534 @table @asis
535 @item (A)
536 @code{ALL(MASK)} is true if all elements of @var{MASK} are true.
537 It also is true if @var{MASK} has zero size; otherwise, it is false.
538 @item (B)
539 If the rank of @var{MASK} is one, then @code{ALL(MASK,DIM)} is equivalent
540 to @code{ALL(MASK)}.  If the rank is greater than one, then @code{ALL(MASK,DIM)}
541 is determined by applying @code{ALL} to the array sections.
542 @end table
544 @item @emph{Example}:
545 @smallexample
546 program test_all
547   logical l
548   l = all((/.true., .true., .true./))
549   print *, l
550   call section
551   contains
552     subroutine section
553       integer a(2,3), b(2,3)
554       a = 1
555       b = 1
556       b(2,2) = 2
557       print *, all(a .eq. b, 1)
558       print *, all(a .eq. b, 2)
559     end subroutine section
560 end program test_all
561 @end smallexample
562 @end table
566 @node ALLOCATED
567 @section @code{ALLOCATED} --- Status of an allocatable entity
568 @findex @code{ALLOCATED} intrinsic
569 @cindex allocation status
571 @table @asis
572 @item @emph{Description}:
573 @code{ALLOCATED(X)} checks the status of whether @var{X} is allocated.
575 @item @emph{Option}:
576 f95, gnu
578 @item @emph{Class}:
579 inquiry function
581 @item @emph{Syntax}:
582 @code{L = ALLOCATED(X)}
584 @item @emph{Arguments}:
585 @multitable @columnfractions .15 .80
586 @item @var{X}    @tab The argument shall be an @code{ALLOCATABLE} array.
587 @end multitable
589 @item @emph{Return value}:
590 The return value is a scalar @code{LOGICAL} with the default logical
591 kind type parameter.  If @var{X} is allocated, @code{ALLOCATED(X)}
592 is @code{.TRUE.}; otherwise, it returns the @code{.TRUE.} 
594 @item @emph{Example}:
595 @smallexample
596 program test_allocated
597   integer :: i = 4
598   real(4), allocatable :: x(:)
599   if (allocated(x) .eqv. .false.) allocate(x(i)
600 end program test_allocated
601 @end smallexample
602 @end table
606 @node ANINT
607 @section @code{ANINT} --- Imaginary part of complex number  
608 @findex @code{ANINT} intrinsic
609 @findex @code{DNINT} intrinsic
610 @cindex whole number
612 @table @asis
613 @item @emph{Description}:
614 @code{ANINT(X [, KIND])} rounds its argument to the nearest whole number.
616 @item @emph{Option}:
617 f95, gnu
619 @item @emph{Class}:
620 elemental function
622 @item @emph{Syntax}:
623 @code{X = ANINT(X)}
624 @code{X = ANINT(X, KIND)}
626 @item @emph{Arguments}:
627 @multitable @columnfractions .15 .80
628 @item @var{X}    @tab The type of the argument shall be @code{REAL(*)}.
629 @item @var{KIND} @tab (Optional) @var{KIND} shall be a scalar integer
630 initialization expression.
631 @end multitable
633 @item @emph{Return value}:
634 The return value is of type real with the kind type parameter of the
635 argument if the optional @var{KIND} is absent; otherwise, the kind
636 type parameter will be given by @var{KIND}.  If @var{X} is greater than
637 zero, then @code{ANINT(X)} returns @code{AINT(X+0.5)}.  If @var{X} is
638 less than or equal to zero, then return @code{AINT(X-0.5)}.
640 @item @emph{Example}:
641 @smallexample
642 program test_anint
643   real(4) x4
644   real(8) x8
645   x4 = 1.234E0_4
646   x8 = 4.321_8
647   print *, anint(x4), dnint(x8)
648   x8 = anint(x4,8)
649 end program test_anint
650 @end smallexample
652 @item @emph{Specific names}:
653 @multitable @columnfractions .24 .24 .24 .24
654 @item Name            @tab Argument         @tab Return type      @tab Option
655 @item @code{DNINT(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)}   @tab f95, gnu
656 @end multitable
657 @end table
661 @node ANY
662 @section @code{ANY} --- Any value in @var{MASK} along @var{DIM} is true 
663 @findex @code{ANY} intrinsic
664 @cindex true values
666 @table @asis
667 @item @emph{Description}:
668 @code{ANY(MASK [, DIM])} determines if any of the values in the logical array @var{MASK}
669 along dimension @var{DIM} are @code{.TRUE.}.
671 @item @emph{Option}:
672 f95, gnu
674 @item @emph{Class}:
675 transformational function
677 @item @emph{Syntax}:
678 @code{L = ANY(MASK)} 
679 @code{L = ANY(MASK, DIM)}
681 @item @emph{Arguments}:
682 @multitable @columnfractions .15 .80
683 @item @var{MASK} @tab The type of the argument shall be @code{LOGICAL(*)} and
684 it shall not be scalar.
685 @item @var{DIM}  @tab (Optional) @var{DIM} shall be a scalar integer
686 with a value that lies between one and the rank of @var{MASK}.
687 @end multitable
689 @item @emph{Return value}:
690 @code{ANY(MASK)} returns a scalar value of type @code{LOGICAL(*)} where
691 the kind type parameter is the same as the kind type parameter of
692 @var{MASK}.  If @var{DIM} is present, then @code{ANY(MASK, DIM)} returns
693 an array with the rank of @var{MASK} minus 1.  The shape is determined from
694 the shape of @var{MASK} where the @var{DIM} dimension is elided. 
696 @table @asis
697 @item (A)
698 @code{ANY(MASK)} is true if any element of @var{MASK} is true;
699 otherwise, it is false.  It also is false if @var{MASK} has zero size.
700 @item (B)
701 If the rank of @var{MASK} is one, then @code{ANY(MASK,DIM)} is equivalent
702 to @code{ANY(MASK)}.  If the rank is greater than one, then @code{ANY(MASK,DIM)}
703 is determined by applying @code{ANY} to the array sections.
704 @end table
706 @item @emph{Example}:
707 @smallexample
708 program test_any
709   logical l
710   l = any((/.true., .true., .true./))
711   print *, l
712   call section
713   contains
714     subroutine section
715       integer a(2,3), b(2,3)
716       a = 1
717       b = 1
718       b(2,2) = 2
719       print *, any(a .eq. b, 1)
720       print *, any(a .eq. b, 2)
721     end subroutine section
722 end program test_any
723 @end smallexample
724 @end table
728 @node ASIN
729 @section @code{ASIN} --- Arcsine function 
730 @findex @code{ASIN} intrinsic
731 @findex @code{DASIN} intrinsic
732 @cindex arcsine
734 @table @asis
735 @item @emph{Description}:
736 @code{ASIN(X)} computes the arcsine of its @var{X}.
738 @item @emph{Option}:
739 f95, gnu
741 @item @emph{Class}:
742 elemental function
744 @item @emph{Syntax}:
745 @code{X = ASIN(X)}
747 @item @emph{Arguments}:
748 @multitable @columnfractions .15 .80
749 @item @var{X} @tab The type shall be @code{REAL(*)}, and a magnitude that is
750 less than one.
751 @end multitable
753 @item @emph{Return value}:
754 The return value is of type @code{REAL(*)} and it lies in the
755 range @math{-\pi / 2 \leq \arccos (x) \leq \pi / 2}.  The kind type
756 parameter is the same as @var{X}.
758 @item @emph{Example}:
759 @smallexample
760 program test_asin
761   real(8) :: x = 0.866_8
762   x = asin(x)
763 end program test_asin
764 @end smallexample
766 @item @emph{Specific names}:
767 @multitable @columnfractions .24 .24 .24 .24
768 @item Name            @tab Argument          @tab Return type       @tab Option
769 @item @code{DASIN(X)} @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab f95, gnu
770 @end multitable
771 @end table
775 @node ASSOCIATED
776 @section @code{ASSOCIATED} --- Status of a pointer or pointer/target pair 
777 @findex @code{ASSOCIATED} intrinsic
778 @cindex pointer status
780 @table @asis
781 @item @emph{Description}:
782 @code{ASSOCIATED(PTR [, TGT])} determines the status of the pointer @var{PTR}
783 or if @var{PTR} is associated with the target @var{TGT}.
785 @item @emph{Option}:
786 f95, gnu
788 @item @emph{Class}:
789 inquiry function
791 @item @emph{Syntax}:
792 @code{L = ASSOCIATED(PTR)} 
793 @code{L = ASSOCIATED(PTR [, TGT])}
795 @item @emph{Arguments}:
796 @multitable @columnfractions .15 .80
797 @item @var{PTR} @tab @var{PTR} shall have the @code{POINTER} attribute and
798 it can be of any type.
799 @item @var{TGT} @tab (Optional) @var{TGT} shall be a @code{POINTER} or
800 a @code{TARGET}.  It must have the same type, kind type parameter, and
801 array rank as @var{PTR}.
802 @end multitable
803 The status of neither @var{PTR} nor @var{TGT} can be undefined.
805 @item @emph{Return value}:
806 @code{ASSOCIATED(PTR)} returns a scalar value of type @code{LOGICAL(4)}.
807 There are several cases:
808 @table @asis
809 @item (A) If the optional @var{TGT} is not present, then @code{ASSOCIATED(PTR)}
810 is true if @var{PTR} is associated with a target; otherwise, it returns false.
811 @item (B) If @var{TGT} is present and a scalar target, the result is true if
812 @var{TGT}
813 is not a 0 sized storage sequence and the target associated with @var{PTR}
814 occupies the same storage units.  If @var{PTR} is disassociated, then the 
815 result is false.
816 @item (C) If @var{TGT} is present and an array target, the result is true if
817 @var{TGT} and @var{PTR} have the same shape, are not 0 sized arrays, are
818 arrays whose elements are not 0 sized storage sequences, and @var{TGT} and
819 @var{PTR} occupy the same storage units in array element order.
820 As in case(B), the result is false, if @var{PTR} is disassociated.
821 @item (D) If @var{TGT} is present and an scalar pointer, the result is true if
822 target associated with @var{PTR} and the target associated with @var{TGT}
823 are not 0 sized storage sequences and occupy the same storage units.
824 The result is false, if either @var{TGT} or @var{PTR} is disassociated.
825 @item (E) If @var{TGT} is present and an array pointer, the result is true if
826 target associated with @var{PTR} and the target associated with @var{TGT}
827 have the same shape, are not 0 sized arrays, are arrays whose elements are
828 not 0 sized storage sequences, and @var{TGT} and @var{PTR} occupy the same
829 storage units in array element order.
830 The result is false, if either @var{TGT} or @var{PTR} is disassociated.
831 @end table
833 @item @emph{Example}:
834 @smallexample
835 program test_associated
836    implicit none
837    real, target  :: tgt(2) = (/1., 2./)
838    real, pointer :: ptr(:)
839    ptr => tgt
840    if (associated(ptr)     .eqv. .false.) call abort
841    if (associated(ptr,tgt) .eqv. .false.) call abort
842 end program test_associated
843 @end smallexample
844 @end table
848 @node ATAN
849 @section @code{ATAN} --- Arctangent function 
850 @findex @code{ATAN} intrinsic
851 @findex @code{DATAN} intrinsic
852 @cindex arctangent
854 @table @asis
855 @item @emph{Description}:
856 @code{ATAN(X)} computes the arctangent of @var{X}.
858 @item @emph{Option}:
859 f95, gnu
861 @item @emph{Class}:
862 elemental function
864 @item @emph{Syntax}:
865 @code{X = ATAN(X)}
867 @item @emph{Arguments}:
868 @multitable @columnfractions .15 .80
869 @item @var{X} @tab The type shall be @code{REAL(*)}.
870 @end multitable
872 @item @emph{Return value}:
873 The return value is of type @code{REAL(*)} and it lies in the
874 range @math{ - \pi / 2 \leq \arcsin (x) \leq \pi / 2}.
876 @item @emph{Example}:
877 @smallexample
878 program test_atan
879   real(8) :: x = 2.866_8
880   x = atan(x)
881 end program test_atan
882 @end smallexample
884 @item @emph{Specific names}:
885 @multitable @columnfractions .24 .24 .24 .24
886 @item Name            @tab Argument          @tab Return type       @tab Option
887 @item @code{DATAN(X)} @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab f95, gnu
888 @end multitable
889 @end table
893 @node ATAN2
894 @section @code{ATAN2} --- Arctangent function 
895 @findex @code{ATAN2} intrinsic
896 @findex @code{DATAN2} intrinsic
897 @cindex arctangent
899 @table @asis
900 @item @emph{Description}:
901 @code{ATAN2(Y,X)} computes the arctangent of the complex number @math{X + i Y}.
903 @item @emph{Option}:
904 f95, gnu
906 @item @emph{Class}:
907 elemental function
909 @item @emph{Syntax}:
910 @code{X = ATAN2(Y,X)}
912 @item @emph{Arguments}:
913 @multitable @columnfractions .15 .80
914 @item @var{Y} @tab The type shall be @code{REAL(*)}.
915 @item @var{X} @tab The type and kind type parameter shall be the same as @var{Y}.
916 If @var{Y} is zero, then @var{X} must be nonzero.
917 @end multitable
919 @item @emph{Return value}:
920 The return value has the same type and kind type parameter as @var{Y}.
921 It is the principle value of the complex number @math{X + i Y}.  If
922 @var{X} is nonzero, then it lies in the range @math{-\pi \le \arccos (x) \leq \pi}.
923 The sign is positive if @var{Y} is positive.  If @var{Y} is zero, then
924 the return value is zero if @var{X} is positive and @math{\pi} if @var{X}
925 is negative.  Finally, if @var{X} is zero, then the magnitude of the result
926 is @math{\pi/2}.
928 @item @emph{Example}:
929 @smallexample
930 program test_atan2
931   real(4) :: x = 1.e0_4, y = 0.5e0_4
932   x = atan2(y,x)
933 end program test_atan2
934 @end smallexample
936 @item @emph{Specific names}:
937 @multitable @columnfractions .24 .24 .24 .24
938 @item Name            @tab Argument          @tab Return type    @tab Option
939 @item @code{DATAN2(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
940 @end multitable
941 @end table
945 @node BESJ0
946 @section @code{BESJ0} --- Bessel function of the first kind of order 0
947 @findex @code{BESJ0} intrinsic
948 @findex @code{DBESJ0} intrinsic
949 @cindex Bessel
951 @table @asis
952 @item @emph{Description}:
953 @code{BESJ0(X)} computes the Bessel function of the first kind of order 0
954 of @var{X}.
956 @item @emph{Option}:
959 @item @emph{Class}:
960 elemental function
962 @item @emph{Syntax}:
963 @code{X = BESJ0(X)}
965 @item @emph{Arguments}:
966 @multitable @columnfractions .15 .80
967 @item @var{X} @tab The type shall be @code{REAL(*)}, and it shall be scalar.
968 @end multitable
970 @item @emph{Return value}:
971 The return value is of type @code{REAL(*)} and it lies in the
972 range @math{ - 0.4027... \leq Bessel (0,x) \leq 1}.
974 @item @emph{Example}:
975 @smallexample
976 program test_besj0
977   real(8) :: x = 0.0_8
978   x = besj0(x)
979 end program test_besj0
980 @end smallexample
982 @item @emph{Specific names}:
983 @multitable @columnfractions .24 .24 .24 .24
984 @item Name            @tab Argument          @tab Return type       @tab Option
985 @item @code{DBESJ0(X)} @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab gnu
986 @end multitable
987 @end table
991 @node BESJ1
992 @section @code{BESJ1} --- Bessel function of the first kind of order 1
993 @findex @code{BESJ1} intrinsic
994 @findex @code{DBESJ1} intrinsic
995 @cindex Bessel
997 @table @asis
998 @item @emph{Description}:
999 @code{BESJ1(X)} computes the Bessel function of the first kind of order 1
1000 of @var{X}.
1002 @item @emph{Option}:
1005 @item @emph{Class}:
1006 elemental function
1008 @item @emph{Syntax}:
1009 @code{X = BESJ1(X)}
1011 @item @emph{Arguments}:
1012 @multitable @columnfractions .15 .80
1013 @item @var{X} @tab The type shall be @code{REAL(*)}, and it shall be scalar.
1014 @end multitable
1016 @item @emph{Return value}:
1017 The return value is of type @code{REAL(*)} and it lies in the
1018 range @math{ - 0.5818... \leq Bessel (0,x) \leq 0.5818 }.
1020 @item @emph{Example}:
1021 @smallexample
1022 program test_besj1
1023   real(8) :: x = 1.0_8
1024   x = besj1(x)
1025 end program test_besj1
1026 @end smallexample
1028 @item @emph{Specific names}:
1029 @multitable @columnfractions .24 .24 .24 .24
1030 @item Name            @tab Argument          @tab Return type       @tab Option
1031 @item @code{DBESJ1(X)}@tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab gnu
1032 @end multitable
1033 @end table
1037 @node BESJN
1038 @section @code{BESJN} --- Bessel function of the first kind
1039 @findex @code{BESJN} intrinsic
1040 @findex @code{DBESJN} intrinsic
1041 @cindex Bessel
1043 @table @asis
1044 @item @emph{Description}:
1045 @code{BESJN(N, X)} computes the Bessel function of the first kind of order
1046 @var{N} of @var{X}.
1048 @item @emph{Option}:
1051 @item @emph{Class}:
1052 elemental function
1054 @item @emph{Syntax}:
1055 @code{Y = BESJN(N, X)}
1057 @item @emph{Arguments}:
1058 @multitable @columnfractions .15 .80
1059 @item @var{N} @tab The type shall be @code{INTEGER(*)}, and it shall be scalar.
1060 @item @var{X} @tab The type shall be @code{REAL(*)}, and it shall be scalar.
1061 @end multitable
1063 @item @emph{Return value}:
1064 The return value is a scalar of type @code{REAL(*)}.
1066 @item @emph{Example}:
1067 @smallexample
1068 program test_besjn
1069   real(8) :: x = 1.0_8
1070   x = besjn(5,x)
1071 end program test_besjn
1072 @end smallexample
1074 @item @emph{Specific names}:
1075 @multitable @columnfractions .24 .24 .24 .24
1076 @item Name             @tab Argument            @tab Return type       @tab Option
1077 @item @code{DBESJN(X)} @tab @code{INTEGER(*) N} @tab @code{REAL(8)}    @tab gnu
1078 @item                  @tab @code{REAL(8) X}    @tab                   @tab
1079 @end multitable
1080 @end table
1084 @node BESY0
1085 @section @code{BESY0} --- Bessel function of the second kind of order 0
1086 @findex @code{BESY0} intrinsic
1087 @findex @code{DBESY0} intrinsic
1088 @cindex Bessel
1090 @table @asis
1091 @item @emph{Description}:
1092 @code{BESY0(X)} computes the Bessel function of the second kind of order 0
1093 of @var{X}.
1095 @item @emph{Option}:
1098 @item @emph{Class}:
1099 elemental function
1101 @item @emph{Syntax}:
1102 @code{X = BESY0(X)}
1104 @item @emph{Arguments}:
1105 @multitable @columnfractions .15 .80
1106 @item @var{X} @tab The type shall be @code{REAL(*)}, and it shall be scalar.
1107 @end multitable
1109 @item @emph{Return value}:
1110 The return value is a scalar of type @code{REAL(*)}.
1112 @item @emph{Example}:
1113 @smallexample
1114 program test_besy0
1115   real(8) :: x = 0.0_8
1116   x = besy0(x)
1117 end program test_besy0
1118 @end smallexample
1120 @item @emph{Specific names}:
1121 @multitable @columnfractions .24 .24 .24 .24
1122 @item Name            @tab Argument          @tab Return type       @tab Option
1123 @item @code{DBESY0(X)}@tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab gnu
1124 @end multitable
1125 @end table
1129 @node BESY1
1130 @section @code{BESY1} --- Bessel function of the second kind of order 1
1131 @findex @code{BESY1} intrinsic
1132 @findex @code{DBESY1} intrinsic
1133 @cindex Bessel
1135 @table @asis
1136 @item @emph{Description}:
1137 @code{BESY1(X)} computes the Bessel function of the second kind of order 1
1138 of @var{X}.
1140 @item @emph{Option}:
1143 @item @emph{Class}:
1144 elemental function
1146 @item @emph{Syntax}:
1147 @code{X = BESY1(X)}
1149 @item @emph{Arguments}:
1150 @multitable @columnfractions .15 .80
1151 @item @var{X} @tab The type shall be @code{REAL(*)}, and it shall be scalar.
1152 @end multitable
1154 @item @emph{Return value}:
1155 The return value is a scalar of type @code{REAL(*)}.
1157 @item @emph{Example}:
1158 @smallexample
1159 program test_besy1
1160   real(8) :: x = 1.0_8
1161   x = besy1(x)
1162 end program test_besy1
1163 @end smallexample
1165 @item @emph{Specific names}:
1166 @multitable @columnfractions .24 .24 .24 .24
1167 @item Name            @tab Argument          @tab Return type       @tab Option
1168 @item @code{DBESY1(X)}@tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab gnu
1169 @end multitable
1170 @end table
1174 @node BESYN
1175 @section @code{BESYN} --- Bessel function of the second kind
1176 @findex @code{BESYN} intrinsic
1177 @findex @code{DBESYN} intrinsic
1178 @cindex Bessel
1180 @table @asis
1181 @item @emph{Description}:
1182 @code{BESYN(N, X)} computes the Bessel function of the second kind of order
1183 @var{N} of @var{X}.
1185 @item @emph{Option}:
1188 @item @emph{Class}:
1189 elemental function
1191 @item @emph{Syntax}:
1192 @code{Y = BESYN(N, X)}
1194 @item @emph{Arguments}:
1195 @multitable @columnfractions .15 .80
1196 @item @var{N} @tab The type shall be @code{INTEGER(*)}, and it shall be scalar.
1197 @item @var{X} @tab The type shall be @code{REAL(*)}, and it shall be scalar.
1198 @end multitable
1200 @item @emph{Return value}:
1201 The return value is a scalar of type @code{REAL(*)}.
1203 @item @emph{Example}:
1204 @smallexample
1205 program test_besyn
1206   real(8) :: x = 1.0_8
1207   x = besyn(5,x)
1208 end program test_besyn
1209 @end smallexample
1211 @item @emph{Specific names}:
1212 @multitable @columnfractions .24 .24 .24 .24
1213 @item Name               @tab Argument            @tab Return type     @tab Option
1214 @item @code{DBESYN(N,X)} @tab @code{INTEGER(*) N} @tab @code{REAL(8)}  @tab gnu
1215 @item                    @tab @code{REAL(8)    X} @tab                 @tab 
1216 @end multitable
1217 @end table
1221 @node BIT_SIZE
1222 @section @code{BIT_SIZE} --- Bit size inquiry function
1223 @findex @code{BIT_SIZE} intrinsic
1224 @cindex bit_size
1226 @table @asis
1227 @item @emph{Description}:
1228 @code{BIT_SIZE(I)} returns the number of bits (integer precision plus sign bit) represented by the type of @var{I}.
1230 @item @emph{Option}:
1231 f95, gnu
1233 @item @emph{Class}:
1234 elemental function
1236 @item @emph{Syntax}:
1237 @code{I = BIT_SIZE(I)}
1239 @item @emph{Arguments}:
1240 @multitable @columnfractions .15 .80
1241 @item @var{I} @tab The type shall be @code{INTEGER(*)}.
1242 @end multitable
1244 @item @emph{Return value}:
1245 The return value is of type @code{INTEGER(*)}
1247 @item @emph{Example}:
1248 @smallexample
1249 program test_bit_size
1250     integer :: i = 123
1251     integer :: size
1252     size = bit_size(i)
1253     print *, size
1254 end program test_bit_size
1255 @end smallexample
1256 @end table
1260 @node BTEST
1261 @section @code{BTEST} --- Bit test function
1262 @findex @code{BTEST} intrinsic
1263 @cindex BTEST
1265 @table @asis
1266 @item @emph{Description}:
1267 @code{BTEST(I,POS)} returns logical .TRUE. if the bit at @var{POS} in @var{I} is set.
1269 @item @emph{Option}:
1270 f95, gnu
1272 @item @emph{Class}:
1273 elemental function
1275 @item @emph{Syntax}:
1276 @code{I = BTEST(I,POS)}
1278 @item @emph{Arguments}:
1279 @multitable @columnfractions .15 .80
1280 @item @var{I} @tab The type shall be @code{INTEGER(*)}.
1281 @item @var{POS} @tab The type shall be @code{INTEGER(*)}.
1282 @end multitable
1284 @item @emph{Return value}:
1285 The return value is of type @code{LOGICAL}
1287 @item @emph{Example}:
1288 @smallexample
1289 program test_btest
1290     integer :: i = 32768 + 1024 + 64
1291     integer :: pos
1292     logical :: bool
1293     do pos=0,16
1294         bool = btest(i, pos) 
1295         print *, pos, bool
1296     end do
1297 end program test_btest
1298 @end smallexample
1299 @end table
1303 @node CEILING
1304 @section @code{CEILING} --- Integer ceiling function
1305 @findex @code{CEILING} intrinsic
1306 @cindex CEILING
1308 @table @asis
1309 @item @emph{Description}:
1310 @code{CEILING(X)} returns the least integer greater than or equal to @var{X}.
1312 @item @emph{Option}:
1313 f95, gnu
1315 @item @emph{Class}:
1316 elemental function
1318 @item @emph{Syntax}:
1319 @code{X = CEILING(X[,KIND])}
1321 @item @emph{Arguments}:
1322 @multitable @columnfractions .15 .80
1323 @item @var{X} @tab The type shall be @code{REAL(*)}.
1324 @item @var{KIND} @tab Optional scaler integer initialization expression.
1325 @end multitable
1327 @item @emph{Return value}:
1328 The return value is of type @code{INTEGER(KIND)}
1330 @item @emph{Example}:
1331 @smallexample
1332 program test_ceiling
1333     real :: x = 63.29
1334     real :: y = -63.59
1335     print *, ceiling(x) ! returns 64
1336     print *, ceiling(y) ! returns -63
1337 end program test_ceiling
1338 @end smallexample
1339 @end table
1343 @node CHAR
1344 @section @code{CHAR} --- Character conversion function
1345 @findex @code{CHAR} intrinsic
1346 @cindex CHAR
1348 @table @asis
1349 @item @emph{Description}:
1350 @code{CHAR(I,[KIND])} returns the character represented by the integer @var{I}.
1352 @item @emph{Option}:
1353 f95, gnu
1355 @item @emph{Class}:
1356 elemental function
1358 @item @emph{Syntax}:
1359 @code{C = CHAR(I[,KIND])}
1361 @item @emph{Arguments}:
1362 @multitable @columnfractions .15 .80
1363 @item @var{I} @tab The type shall be @code{INTEGER(*)}.
1364 @item @var{KIND} @tab Optional scaler integer initialization expression.
1365 @end multitable
1367 @item @emph{Return value}:
1368 The return value is of type @code{CHARACTER(1)}
1370 @item @emph{Example}:
1371 @smallexample
1372 program test_char
1373     integer :: i = 74
1374     character(1) :: c
1375     c = char(i)
1376     print *, i, c ! returns 'J'
1377 end program test_char
1378 @end smallexample
1379 @end table
1383 @node CMPLX
1384 @section @code{CMPLX} --- Complex conversion function
1385 @findex @code{CMPLX} intrinsic
1386 @cindex CMPLX
1388 @table @asis
1389 @item @emph{Description}:
1390 @code{CMPLX(X,[Y,KIND])} returns a complex number where @var{X} is converted to
1391 the real component.  If @var{Y} is present it is converted to the imaginary
1392 component.  If @var{Y} is not present then the imaginary component is set to
1393 0.0.  If @var{X} is complex then @var{Y} must not be present.
1395 @item @emph{Option}:
1396 f95, gnu
1398 @item @emph{Class}:
1399 elemental function
1401 @item @emph{Syntax}:
1402 @code{C = CMPLX(X[,Y,KIND])}
1404 @item @emph{Arguments}:
1405 @multitable @columnfractions .15 .80
1406 @item @var{X} @tab The type may be @code{INTEGER(*)}, @code{REAL(*)}, or @code{COMPLEX(*)}.
1407 @item @var{Y} @tab Optional, allowed if @var{X} is not @code{COMPLEX(*)}.  May be @code{INTEGER(*)} or @code{REAL(*)}. 
1408 @item @var{KIND} @tab Optional scaler integer initialization expression.
1409 @end multitable
1411 @item @emph{Return value}:
1412 The return value is of type @code{COMPLEX(*)}
1414 @item @emph{Example}:
1415 @smallexample
1416 program test_cmplx
1417     integer :: i = 42
1418     real :: x = 3.14
1419     complex :: z
1420     z = cmplx(i, x)
1421     print *, z, cmplx(x)
1422 end program test_cmplx
1423 @end smallexample
1424 @end table
1428 @node COMMAND_ARGUMENT_COUNT
1429 @section @code{COMMAND_ARGUMENT_COUNT} --- Argument count function 
1430 @findex @code{COMMAND_ARGUMENT_COUNT} intrinsic
1431 @cindex command argument count
1433 @table @asis
1434 @item @emph{Description}:
1435 @code{COMMAND_ARGUMENT_COUNT()} returns the number of arguments passed on the
1436 command line when the containing program was invoked.
1438 @item @emph{Option}:
1439 f2003, gnu
1441 @item @emph{Class}:
1442 non-elemental function
1444 @item @emph{Syntax}:
1445 @code{I = COMMAND_ARGUMENT_COUNT()}
1447 @item @emph{Arguments}:
1448 @multitable @columnfractions .15 .80
1449 @item None
1450 @end multitable
1452 @item @emph{Return value}:
1453 The return value is of type @code{INTEGER(4)}
1455 @item @emph{Example}:
1456 @smallexample
1457 program test_command_argument_count
1458     integer :: count
1459     count = command_argument_count()
1460     print *, count
1461 end program test_command_argument_count
1462 @end smallexample
1463 @end table
1467 @node CONJG
1468 @section @code{CONJG} --- Complex conjugate function 
1469 @findex @code{CONJG} intrinsic
1470 @findex @code{DCONJG} intrinsic
1471 @cindex complex conjugate
1472 @table @asis
1473 @item @emph{Description}:
1474 @code{CONJG(Z)} returns the conjugate of @var{Z}.  If @var{Z} is @code{(x, y)}
1475 then the result is @code{(x, -y)}
1477 @item @emph{Option}:
1478 f95, gnu
1480 @item @emph{Class}:
1481 elemental function
1483 @item @emph{Syntax}:
1484 @code{Z = CONJG(Z)}
1486 @item @emph{Arguments}:
1487 @multitable @columnfractions .15 .80
1488 @item @var{Z} @tab The type shall be @code{COMPLEX(*)}.
1489 @end multitable
1491 @item @emph{Return value}:
1492 The return value is of type @code{COMPLEX(*)}.
1494 @item @emph{Example}:
1495 @smallexample
1496 program test_conjg
1497     complex :: z = (2.0, 3.0)
1498     complex(8) :: dz = (2.71_8, -3.14_8)
1499     z= conjg(z)
1500     print *, z
1501     dz = dconjg(dz)
1502     print *, dz
1503 end program test_conjg
1504 @end smallexample
1506 @item @emph{Specific names}:
1507 @multitable @columnfractions .24 .24 .24 .24
1508 @item Name             @tab Argument             @tab Return type          @tab Option
1509 @item @code{DCONJG(Z)} @tab @code{COMPLEX(8) Z}  @tab @code{COMPLEX(8)}    @tab gnu
1510 @end multitable
1511 @end table
1515 @node COS
1516 @section @code{COS} --- Cosine function 
1517 @findex @code{COS} intrinsic
1518 @findex @code{DCOS} intrinsic
1519 @findex @code{ZCOS} intrinsic
1520 @findex @code{CDCOS} intrinsic
1521 @cindex cosine
1523 @table @asis
1524 @item @emph{Description}:
1525 @code{COS(X)} computes the cosine of @var{X}.
1527 @item @emph{Option}:
1528 f95, gnu
1530 @item @emph{Class}:
1531 elemental function
1533 @item @emph{Syntax}:
1534 @code{X = COS(X)}
1536 @item @emph{Arguments}:
1537 @multitable @columnfractions .15 .80
1538 @item @var{X} @tab The type shall be @code{REAL(*)} or
1539 @code{COMPLEX(*)}.
1540 @end multitable
1542 @item @emph{Return value}:
1543 The return value has the same type and kind as @var{X}.
1545 @item @emph{Example}:
1546 @smallexample
1547 program test_cos
1548   real :: x = 0.0
1549   x = cos(x)
1550 end program test_cos
1551 @end smallexample
1553 @item @emph{Specific names}:
1554 @multitable @columnfractions .24 .24 .24 .24
1555 @item Name            @tab Argument          @tab Return type     @tab Option
1556 @item @code{DCOS(X)}  @tab @code{REAL(8) X}  @tab @code{REAL(8)}  @tab f95, gnu
1557 @item @code{CCOS(X)}@tab @code{COMPLEX(4) X}@tab @code{COMPLEX(4)}@tab f95, gnu
1558 @item @code{ZCOS(X)}@tab @code{COMPLEX(8) X}@tab @code{COMPLEX(8)}@tab f95, gnu
1559 @item @code{CDCOS(X)}@tab @code{COMPLEX(8) X}@tab @code{COMPLEX(8)}@tab f95, gnu
1560 @end multitable
1561 @end table
1565 @node COSH
1566 @section @code{COSH} --- Hyperbolic cosine function 
1567 @findex @code{COSH} intrinsic
1568 @findex @code{DCOSH} intrinsic
1569 @cindex hyperbolic cosine
1571 @table @asis
1572 @item @emph{Description}:
1573 @code{COSH(X)} computes the hyperbolic cosine of @var{X}.
1575 @item @emph{Option}:
1576 f95, gnu
1578 @item @emph{Class}:
1579 elemental function
1581 @item @emph{Syntax}:
1582 @code{X = COSH(X)}
1584 @item @emph{Arguments}:
1585 @multitable @columnfractions .15 .80
1586 @item @var{X} @tab The type shall be @code{REAL(*)}.
1587 @end multitable
1589 @item @emph{Return value}:
1590 The return value is of type @code{REAL(*)} and it is positive
1591 (@math{ \cosh (x) \geq 0 }.
1593 @item @emph{Example}:
1594 @smallexample
1595 program test_cosh
1596   real(8) :: x = 1.0_8
1597   x = cosh(x)
1598 end program test_cosh
1599 @end smallexample
1601 @item @emph{Specific names}:
1602 @multitable @columnfractions .24 .24 .24 .24
1603 @item Name            @tab Argument          @tab Return type       @tab Option
1604 @item @code{DCOSH(X)} @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab f95, gnu
1605 @end multitable
1606 @end table
1610 @node COUNT
1611 @section @code{COUNT} --- Count function
1612 @findex @code{COUNT} intrinsic
1613 @cindex count
1615 @table @asis
1616 @item @emph{Description}:
1617 @code{COUNT(MASK[,DIM])} counts the number of @code{.TRUE.} elements of
1618 @var{MASK} along the dimension of @var{DIM}.  If @var{DIM} is omitted it is
1619 taken to be @code{1}.  @var{DIM} is a scaler of type @code{INTEGER} in the
1620 range of @math{1 /leq DIM /leq n)} where @math{n} is the rank of @var{MASK}.
1622 @item @emph{Option}:
1623 f95, gnu
1625 @item @emph{Class}:
1626 transformational function
1628 @item @emph{Syntax}:
1629 @code{I = COUNT(MASK[,DIM])}
1631 @item @emph{Arguments}:
1632 @multitable @columnfractions .15 .80
1633 @item @var{MASK} @tab The type shall be @code{LOGICAL}.
1634 @item @var{DIM}  @tab The type shall be @code{INTEGER}.
1635 @end multitable
1637 @item @emph{Return value}:
1638 The return value is of type @code{INTEGER} with rank equal to that of
1639 @var{MASK}.
1641 @item @emph{Example}:
1642 @smallexample
1643 program test_count
1644     integer, dimension(2,3) :: a, b
1645     logical, dimension(2,3) :: mask
1646     a = reshape( (/ 1, 2, 3, 4, 5, 6 /), (/ 2, 3 /))
1647     b = reshape( (/ 0, 7, 3, 4, 5, 8 /), (/ 2, 3 /))
1648     print '(3i3)', a(1,:)
1649     print '(3i3)', a(2,:)
1650     print *
1651     print '(3i3)', b(1,:)
1652     print '(3i3)', b(2,:)
1653     print *
1654     mask = a.ne.b
1655     print '(3l3)', mask(1,:)
1656     print '(3l3)', mask(2,:)
1657     print *
1658     print '(3i3)', count(mask)
1659     print *
1660     print '(3i3)', count(mask, 1)
1661     print *
1662     print '(3i3)', count(mask, 2)
1663 end program test_count
1664 @end smallexample
1665 @end table
1669 @node CPU_TIME
1670 @section @code{CPU_TIME} --- CPU elapsed time in seconds
1671 @findex @code{CPU_TIME} intrinsic
1672 @cindex CPU_TIME
1674 @table @asis
1675 @item @emph{Description}:
1676 Returns a @code{REAL} value representing the elapsed CPU time in seconds.  This
1677 is useful for testing segments of code to determine execution time.
1679 @item @emph{Option}:
1680 f95, gnu
1682 @item @emph{Class}:
1683 subroutine
1685 @item @emph{Syntax}:
1686 @code{CPU_TIME(X)}
1688 @item @emph{Arguments}:
1689 @multitable @columnfractions .15 .80
1690 @item @var{X} @tab The type shall be @code{REAL} with intent out.
1691 @end multitable
1693 @item @emph{Return value}:
1694 None
1696 @item @emph{Example}:
1697 @smallexample
1698 program test_cpu_time
1699     real :: start, finish
1700     call cpu_time(start)
1701         ! put code to test here
1702     call cpu_time(finish)
1703     print '("Time = ",f6.3," seconds.")',finish-start
1704 end program test_cpu_time
1705 @end smallexample
1706 @end table
1710 @node CSHIFT
1711 @section @code{CSHIFT} --- Circular shift function
1712 @findex @code{CSHIFT} intrinsic
1713 @cindex cshift intrinsic
1715 @table @asis
1716 @item @emph{Description}:
1717 @code{CSHIFT(ARRAY, SHIFT[,DIM])} performs a circular shift on elements of
1718 @var{ARRAY} along the dimension of @var{DIM}.  If @var{DIM} is omitted it is
1719 taken to be @code{1}.  @var{DIM} is a scaler of type @code{INTEGER} in the
1720 range of @math{1 /leq DIM /leq n)} where @math{n} is the rank of @var{ARRAY}.
1721 If the rank of @var{ARRAY} is one, then all elements of @var{ARRAY} are shifted
1722 by @var{SHIFT} places.  If rank is greater than one, then all complete rank one
1723 sections of @var{ARRAY} along the given dimension are shifted.  Elements
1724 shifted out one end of each rank one section are shifted back in the other end.
1726 @item @emph{Option}:
1727 f95, gnu
1729 @item @emph{Class}:
1730 transformational function
1732 @item @emph{Syntax}:
1733 @code{A = CSHIFT(A, SHIFT[,DIM])}
1735 @item @emph{Arguments}:
1736 @multitable @columnfractions .15 .80
1737 @item @var{ARRAY}  @tab May be any type, not scaler.
1738 @item @var{SHIFT}  @tab The type shall be @code{INTEGER}.
1739 @item @var{DIM}    @tab The type shall be @code{INTEGER}.
1740 @end multitable
1742 @item @emph{Return value}:
1743 Returns an array of same type and rank as the @var{ARRAY} argument.
1745 @item @emph{Example}:
1746 @smallexample
1747 program test_cshift
1748     integer, dimension(3,3) :: a
1749     a = reshape( (/ 1, 2, 3, 4, 5, 6, 7, 8, 9 /), (/ 3, 3 /))
1750     print '(3i3)', a(1,:)
1751     print '(3i3)', a(2,:)
1752     print '(3i3)', a(3,:)    
1753     a = cshift(a, SHIFT=(/1, 2, -1/), DIM=2)
1754     print *
1755     print '(3i3)', a(1,:)
1756     print '(3i3)', a(2,:)
1757     print '(3i3)', a(3,:)
1758 end program test_cshift
1759 @end smallexample
1760 @end table
1764 @node DATE_AND_TIME
1765 @section @code{DATE_AND_TIME} --- Date and time subroutine
1766 @findex @code{DATE_AND_TIME} intrinsic
1767 @cindex DATE_AND_TIME
1769 @table @asis
1770 @item @emph{Description}:
1771 @code{DATE_AND_TIME(DATE, TIME, ZONE, VALUES)} gets the corresponding date and
1772 time information from the real-time system clock.  @var{DATE} is
1773 @code{INTENT(OUT)} and has form ccyymmdd.  @var{TIME} is @code{INTENT(OUT)} and
1774 has form hhmmss.sss.  @var{ZONE} is @code{INTENT(OUT)} and has form (+-)hhmm,
1775 representing the difference with respect to Coordinated Universal Time (UTC).
1776 Unavailable time and date parameters return blanks.
1778 @var{VALUES} is @code{INTENT(OUT)} and provides the following:
1780 @multitable @columnfractions .15 .30 .60
1781 @item @tab @code{VALUE(1)}: @tab The year
1782 @item @tab @code{VALUE(2)}: @tab The month
1783 @item @tab @code{VALUE(3)}: @tab The day of the month
1784 @item @tab @code{VAlUE(4)}: @tab Time difference with UTC in minutes
1785 @item @tab @code{VALUE(5)}: @tab The hour of the day
1786 @item @tab @code{VALUE(6)}: @tab The minutes of the hour
1787 @item @tab @code{VALUE(7)}: @tab The seconds of the minute
1788 @item @tab @code{VALUE(8)}: @tab The milliseconds of the second
1789 @end multitable     
1791 @item @emph{Option}:
1792 f95, gnu
1794 @item @emph{Class}:
1795 subroutine
1797 @item @emph{Syntax}:
1798 @code{CALL DATE_AND_TIME([DATE, TIME, ZONE, VALUES])}
1800 @item @emph{Arguments}:
1801 @multitable @columnfractions .15 .80
1802 @item @var{DATE}  @tab (Optional) The type shall be @code{CHARACTER(8)} or larger.
1803 @item @var{TIME}  @tab (OPtional) The type shall be @code{CHARACTER(10)} or larger.
1804 @item @var{ZONE}  @tab (Optional) The type shall be @code{CHARACTER(5)} or larger.
1805 @item @var{VALUES}@tab (Optional) The type shall be @code{INTEGER(8)}.
1806 @end multitable
1808 @item @emph{Return value}:
1809 None
1811 @item @emph{Example}:
1812 @smallexample
1813 program test_time_and_date
1814     character(8)  :: date
1815     character(10) :: time
1816     character(5)  :: zone
1817     integer,dimension(8) :: values
1818     ! using keyword arguments
1819     call date_and_time(date,time,zone,values)
1820     call date_and_time(DATE=date,ZONE=zone)
1821     call date_and_time(TIME=time)
1822     call date_and_time(VALUES=values)
1823     print '(a,2x,a,2x,a)', date, time, zone
1824     print '(8i5))', values
1825 end program test_time_and_date
1826 @end smallexample
1827 @end table
1831 @node DBLE
1832 @section @code{DBLE} --- Double conversion function 
1833 @findex @code{DBLE} intrinsic
1834 @cindex double conversion
1836 @table @asis
1837 @item @emph{Description}:
1838 @code{DBLE(X)} Converts @var{X} to double precision real type.
1839 @code{DFLOAT} is an alias for @code{DBLE}
1841 @item @emph{Option}:
1842 f95, gnu
1844 @item @emph{Class}:
1845 elemental function
1847 @item @emph{Syntax}:
1848 @code{X = DBLE(X)}
1849 @code{X = DFLOAT(X)}
1851 @item @emph{Arguments}:
1852 @multitable @columnfractions .15 .80
1853 @item @var{X} @tab The type shall be @code{INTEGER(*)}, @code{REAL(*)}, or @code{COMPLEX(*)}.
1854 @end multitable
1856 @item @emph{Return value}:
1857 The return value is of type double precision real.
1859 @item @emph{Example}:
1860 @smallexample
1861 program test_dble
1862     real    :: x = 2.18
1863     integer :: i = 5
1864     complex :: z = (2.3,1.14)
1865     print *, dble(x), dble(i), dfloat(z)
1866 end program test_dble
1867 @end smallexample
1868 @end table
1872 @node DCMPLX
1873 @section @code{DCMPLX} --- Double complex conversion function
1874 @findex @code{DCMPLX} intrinsic
1875 @cindex DCMPLX
1877 @table @asis
1878 @item @emph{Description}:
1879 @code{DCMPLX(X [,Y])} returns a double complex number where @var{X} is
1880 converted to the real component.  If @var{Y} is present it is converted to the
1881 imaginary component.  If @var{Y} is not present then the imaginary component is
1882 set to 0.0.  If @var{X} is complex then @var{Y} must not be present.
1884 @item @emph{Option}:
1885 f95, gnu
1887 @item @emph{Class}:
1888 elemental function
1890 @item @emph{Syntax}:
1891 @code{C = DCMPLX(X)}
1892 @code{C = DCMPLX(X,Y)}
1894 @item @emph{Arguments}:
1895 @multitable @columnfractions .15 .80
1896 @item @var{X} @tab The type may be @code{INTEGER(*)}, @code{REAL(*)}, or @code{COMPLEX(*)}.
1897 @item @var{Y} @tab Optional if @var{X} is not @code{COMPLEX(*)}. May be @code{INTEGER(*)} or @code{REAL(*)}. 
1898 @end multitable
1900 @item @emph{Return value}:
1901 The return value is of type @code{COMPLEX(8)}
1903 @item @emph{Example}:
1904 @smallexample
1905 program test_dcmplx
1906     integer :: i = 42
1907     real :: x = 3.14
1908     complex :: z
1909     z = cmplx(i, x)
1910     print *, dcmplx(i)
1911     print *, dcmplx(x)
1912     print *, dcmplx(z)
1913     print *, dcmplx(x,i)
1914 end program test_dcmplx
1915 @end smallexample
1916 @end table
1920 @node DFLOAT
1921 @section @code{DFLOAT} --- Double conversion function 
1922 @findex @code{DFLOAT} intrinsic
1923 @cindex double float conversion
1925 @table @asis
1926 @item @emph{Description}:
1927 @code{DFLOAT(X)} Converts @var{X} to double precision real type.
1928 @code{DFLOAT} is an alias for @code{DBLE}.  See @code{DBLE}.
1929 @end table
1933 @node DIGITS
1934 @section @code{DIGITS} --- Significant digits function
1935 @findex @code{DIGITS} intrinsic
1936 @cindex digits, significant
1938 @table @asis
1939 @item @emph{Description}:
1940 @code{DIGITS(X)} returns the number of significant digits of the internal model
1941 representation of @var{X}.  For example, on a system using a 32-bit
1942 floating point representation, a default real number would likely return 24.
1944 @item @emph{Option}:
1945 f95, gnu
1947 @item @emph{Class}:
1948 inquiry function
1950 @item @emph{Syntax}:
1951 @code{C = DIGITS(X)}
1953 @item @emph{Arguments}:
1954 @multitable @columnfractions .15 .80
1955 @item @var{X} @tab The type may be @code{INTEGER(*)} or @code{REAL(*)}.
1956 @end multitable
1958 @item @emph{Return value}:
1959 The return value is of type @code{INTEGER}.
1961 @item @emph{Example}:
1962 @smallexample
1963 program test_digits
1964     integer :: i = 12345
1965     real :: x = 3.143
1966     real(8) :: y = 2.33
1967     complex :: z = (23.0,45.6)
1968     print *, digits(i)
1969     print *, digits(x)
1970     print *, digits(y)
1971 end program test_digits
1972 @end smallexample
1973 @end table
1977 @node DIM
1978 @section @code{DIM} --- Dim function
1979 @findex @code{DIM} intrinsic
1980 @findex @code{IDIM} intrinsic
1981 @findex @code{DDIM} intrinsic
1982 @cindex dim
1984 @table @asis
1985 @item @emph{Description}:
1986 @code{DIM(X,Y)} returns the difference @code{X-Y} if the result is positive;
1987 otherwise returns zero.
1989 @item @emph{Option}:
1990 f95, gnu
1992 @item @emph{Class}:
1993 elemental function
1995 @item @emph{Syntax}:
1996 @code{X = DIM(X,Y)}
1998 @item @emph{Arguments}:
1999 @multitable @columnfractions .15 .80
2000 @item @var{X} @tab The type shall be @code{INTEGER(*)} or @code{REAL(*)}
2001 @item @var{Y} @tab The type shall be the same type and kind as @var{X}.
2002 @end multitable
2004 @item @emph{Return value}:
2005 The return value is of type @code{INTEGER(*)} or @code{REAL(*)}.
2007 @item @emph{Example}:
2008 @smallexample
2009 program test_dim
2010     integer :: i
2011     real(8) :: x
2012     i = dim(4, 15)
2013     x = dim(4.345_8, 2.111_8)
2014     print *, i
2015     print *, x
2016 end program test_dim
2017 @end smallexample
2019 @item @emph{Specific names}:
2020 @multitable @columnfractions .24 .24 .24 .24
2021 @item Name            @tab Argument          @tab Return type       @tab Option
2022 @item @code{IDIM(X,Y)} @tab @code{INTEGER(4) X,Y} @tab @code{INTEGER(4)} @tab gnu
2023 @item @code{DDIM(X,Y)} @tab @code{REAL(8) X,Y}  @tab @code{REAL(8)} @tab gnu
2024 @end multitable
2025 @end table
2029 @node DOT_PRODUCT
2030 @section @code{DOT_PRODUCT} --- Dot product function
2031 @findex @code{DOT_PRODUCT} intrinsic
2032 @cindex Dot product
2034 @table @asis
2035 @item @emph{Description}:
2036 @code{DOT_PRODUCT(X,Y)} computes the dot product multiplication of two vectors
2037 @var{X} and @var{Y}.  The two vectors may be either numeric or logical
2038 and must be arrays of rank one and of equal size. If the vectors are
2039 @code{INTEGER(*)} or @code{REAL(*)}, the result is @code{SUM(X*Y)}. If the
2040 vectors are @code{COMPLEX(*)}, the result is @code{SUM(CONJG(X)*Y)}. If the 
2041 vectors are @code{LOGICAL}, the result is @code{ANY(X.AND.Y)}.
2043 @item @emph{Option}:
2046 @item @emph{Class}:
2047 transformational function
2049 @item @emph{Syntax}:
2050 @code{S = DOT_PRODUCT(X,Y)}
2052 @item @emph{Arguments}:
2053 @multitable @columnfractions .15 .80
2054 @item @var{X} @tab The type shall be numeric or @code{LOGICAL}, rank 1.
2055 @item @var{Y} @tab The type shall be numeric or @code{LOGICAL}, rank 1.
2056 @end multitable
2058 @item @emph{Return value}:
2059 If the arguments are numeric, the return value is a scaler of numeric type,
2060 @code{INTEGER(*)}, @code{REAL(*)}, or @code{COMPLEX(*)}.  If the arguments are
2061 @code{LOGICAL}, the return value is @code{.TRUE.} or @code{.FALSE.}.
2063 @item @emph{Example}:
2064 @smallexample
2065 program test_dot_prod
2066     integer, dimension(3) :: a, b
2067     a = (/ 1, 2, 3 /)
2068     b = (/ 4, 5, 6 /)
2069     print '(3i3)', a
2070     print *
2071     print '(3i3)', b
2072     print *
2073     print *, dot_product(a,b)
2074 end program test_dot_prod
2075 @end smallexample
2076 @end table
2080 @node DPROD
2081 @section @code{DPROD} --- Double product function
2082 @findex @code{DPROD} intrinsic
2083 @cindex Double product
2085 @table @asis
2086 @item @emph{Description}:
2087 @code{DPROD(X,Y)} returns the product @code{X*Y}.
2089 @item @emph{Option}:
2090 f95, gnu
2092 @item @emph{Class}:
2093 elemental function
2095 @item @emph{Syntax}:
2096 @code{D = DPROD(X,Y)}
2098 @item @emph{Arguments}:
2099 @multitable @columnfractions .15 .80
2100 @item @var{X} @tab The type shall be @code{REAL}.
2101 @item @var{Y} @tab The type shall be @code{REAL}.
2102 @end multitable
2104 @item @emph{Return value}:
2105 The return value is of type @code{REAL(8)}.
2107 @item @emph{Example}:
2108 @smallexample
2109 program test_dprod
2110     integer :: i
2111     real :: x = 5.2
2112     real :: y = 2.3
2113     real(8) :: d
2114     d = dprod(x,y)
2115     print *, d
2116 end program test_dprod
2117 @end smallexample
2118 @end table
2122 @node DREAL
2123 @section @code{DREAL} --- Double real part function
2124 @findex @code{DREAL} intrinsic
2125 @cindex Double real part
2127 @table @asis
2128 @item @emph{Description}:
2129 @code{DREAL(Z)} returns the real part of complex variable @var{Z}.
2131 @item @emph{Option}:
2134 @item @emph{Class}:
2135 elemental function
2137 @item @emph{Syntax}:
2138 @code{D = DREAL(Z)}
2140 @item @emph{Arguments}:
2141 @multitable @columnfractions .15 .80
2142 @item @var{Z} @tab The type shall be @code{COMPLEX(8)}.
2143 @end multitable
2145 @item @emph{Return value}:
2146 The return value is of type @code{REAL(8)}.
2148 @item @emph{Example}:
2149 @smallexample
2150 program test_dreal
2151     complex(8) :: z = (1.3_8,7.2_8)
2152     print *, dreal(z)
2153 end program test_dreal
2154 @end smallexample
2155 @end table
2159 @node DTIME
2160 @section @code{DTIME} --- Execution time subroutine (or function)
2161 @findex @code{DTIME} intrinsic
2162 @cindex dtime subroutine 
2164 @table @asis
2165 @item @emph{Description}:
2166 @code{DTIME(TARRAY, RESULT)} initially returns the number of seconds of runtime
2167 since the start of the process's execution in @var{RESULT}.  @var{TARRAY}
2168 returns the user and system components of this time in @code{TARRAY(1)} and
2169 @code{TARRAY(2)} respectively. @var{RESULT} is equal to @code{TARRAY(1) + TARRAY(2)}.
2171 Subsequent invocations of @code{DTIME} return values accumulated since the previous invocation.
2173 On some systems, the underlying timings are represented using types with
2174 sufficiently small limits that overflows (wraparounds) are possible, such as
2175 32-bit types. Therefore, the values returned by this intrinsic might be, or
2176 become, negative, or numerically less than previous values, during a single
2177 run of the compiled program.
2179 If @code{DTIME} is invoked as a function, it can not be invoked as a
2180 subroutine, and vice versa.
2182 @var{TARRAY} and @var{RESULT} are @code{INTENT(OUT)} and provide the following:
2184 @multitable @columnfractions .15 .30 .60
2185 @item @tab @code{TARRAY(1)}: @tab User time in seconds.
2186 @item @tab @code{TARRAY(2)}: @tab System time in seconds.
2187 @item @tab @code{RESULT}: @tab Run time since start in seconds.
2188 @end multitable
2190 @item @emph{Option}:
2193 @item @emph{Class}:
2194 subroutine
2196 @item @emph{Syntax}:
2197 @code{CALL DTIME(TARRAY, RESULT)}
2198 @code{RESULT = DTIME(TARRAY)}, (not recommended)
2200 @item @emph{Arguments}:
2201 @multitable @columnfractions .15 .80
2202 @item @var{TARRAY}@tab The type shall be @code{REAL, DIMENSION(2)}.
2203 @item @var{RESULT}@tab The type shall be @code{REAL}.
2204 @end multitable
2206 @item @emph{Return value}:
2207 Elapsed time in seconds since the start of program execution.
2209 @item @emph{Example}:
2210 @smallexample
2211 program test_dtime
2212     integer(8) :: i, j
2213     real, dimension(2) :: tarray
2214     real :: result
2215     call dtime(tarray, result)
2216     print *, result
2217     print *, tarray(1)
2218     print *, tarray(2)   
2219     do i=1,100000000    ! Just a delay
2220         j = i * i - i
2221     end do
2222     call dtime(tarray, result)
2223     print *, result
2224     print *, tarray(1)
2225     print *, tarray(2)
2226 end program test_dtime
2227 @end smallexample
2228 @end table
2232 @node ERF
2233 @section @code{ERF} --- Error function 
2234 @findex @code{ERF} intrinsic
2235 @cindex error function
2237 @table @asis
2238 @item @emph{Description}:
2239 @code{ERF(X)} computes the error function of @var{X}.
2241 @item @emph{Option}:
2244 @item @emph{Class}:
2245 elemental function
2247 @item @emph{Syntax}:
2248 @code{X = ERF(X)}
2250 @item @emph{Arguments}:
2251 @multitable @columnfractions .15 .80
2252 @item @var{X} @tab The type shall be @code{REAL(*)}, and it shall be scalar.
2253 @end multitable
2255 @item @emph{Return value}:
2256 The return value is a scalar of type @code{REAL(*)} and it is positive
2257 (@math{ - 1 \leq erf (x) \leq 1 }.
2259 @item @emph{Example}:
2260 @smallexample
2261 program test_erf
2262   real(8) :: x = 0.17_8
2263   x = erf(x)
2264 end program test_erf
2265 @end smallexample
2267 @item @emph{Specific names}:
2268 @multitable @columnfractions .24 .24 .24 .24
2269 @item Name            @tab Argument          @tab Return type       @tab Option
2270 @item @code{DERF(X)}  @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab gnu
2271 @end multitable
2272 @end table
2276 @node ERFC
2277 @section @code{ERFC} --- Error function 
2278 @findex @code{ERFC} intrinsic
2279 @cindex error function
2281 @table @asis
2282 @item @emph{Description}:
2283 @code{ERFC(X)} computes the complementary error function of @var{X}.
2285 @item @emph{Option}:
2288 @item @emph{Class}:
2289 elemental function
2291 @item @emph{Syntax}:
2292 @code{X = ERFC(X)}
2294 @item @emph{Arguments}:
2295 @multitable @columnfractions .15 .80
2296 @item @var{X} @tab The type shall be @code{REAL(*)}, and it shall be scalar.
2297 @end multitable
2299 @item @emph{Return value}:
2300 The return value is a scalar of type @code{REAL(*)} and it is positive
2301 (@math{ 0 \leq erfc (x) \leq 2 }.
2303 @item @emph{Example}:
2304 @smallexample
2305 program test_erfc
2306   real(8) :: x = 0.17_8
2307   x = erfc(x)
2308 end program test_erfc
2309 @end smallexample
2311 @item @emph{Specific names}:
2312 @multitable @columnfractions .24 .24 .24 .24
2313 @item Name            @tab Argument          @tab Return type       @tab Option
2314 @item @code{DERFC(X)} @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab gnu
2315 @end multitable
2316 @end table
2320 @node EXP
2321 @section @code{EXP} --- Exponential function 
2322 @findex @code{EXP} intrinsic
2323 @findex @code{DEXP} intrinsic
2324 @findex @code{ZEXP} intrinsic
2325 @findex @code{CDEXP} intrinsic
2326 @cindex exponential
2328 @table @asis
2329 @item @emph{Description}:
2330 @code{EXP(X)} computes the base @math{e} exponential of @var{X}.
2332 @item @emph{Option}:
2333 f95, gnu
2335 @item @emph{Class}:
2336 elemental function
2338 @item @emph{Syntax}:
2339 @code{X = EXP(X)}
2341 @item @emph{Arguments}:
2342 @multitable @columnfractions .15 .80
2343 @item @var{X} @tab The type shall be @code{REAL(*)} or
2344 @code{COMPLEX(*)}.
2345 @end multitable
2347 @item @emph{Return value}:
2348 The return value has same type and kind as @var{X}.
2350 @item @emph{Example}:
2351 @smallexample
2352 program test_exp
2353   real :: x = 1.0
2354   x = exp(x)
2355 end program test_exp
2356 @end smallexample
2358 @item @emph{Specific names}:
2359 @multitable @columnfractions .24 .24 .24 .24
2360 @item Name            @tab Argument          @tab Return type       @tab Option
2361 @item @code{DEXP(X)}  @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab f95, gnu
2362 @item @code{CEXP(X)}  @tab @code{COMPLEX(4) X}  @tab @code{COMPLEX(4)}    @tab f95, gnu
2363 @item @code{ZEXP(X)}  @tab @code{COMPLEX(8) X}  @tab @code{COMPLEX(8)}    @tab f95, gnu
2364 @item @code{CDEXP(X)} @tab @code{COMPLEX(8) X}  @tab @code{COMPLEX(8)}    @tab f95, gnu
2365 @end multitable
2366 @end table
2370 @node LOG
2371 @section @code{LOG} --- Logarithm function
2372 @findex @code{LOG} intrinsic
2373 @findex @code{ALOG} intrinsic
2374 @findex @code{DLOG} intrinsic
2375 @findex @code{CLOG} intrinsic
2376 @findex @code{ZLOG} intrinsic
2377 @findex @code{CDLOG} intrinsic
2378 @cindex logarithm
2380 @table @asis
2381 @item @emph{Description}:
2382 @code{LOG(X)} computes the logarithm of @var{X}.
2384 @item @emph{Option}:
2385 f95, gnu
2387 @item @emph{Class}:
2388 elemental function
2390 @item @emph{Syntax}:
2391 @code{X = LOG(X)}
2393 @item @emph{Arguments}:
2394 @multitable @columnfractions .15 .80
2395 @item @var{X} @tab The type shall be @code{REAL(*)} or
2396 @code{COMPLEX(*)}.
2397 @end multitable
2399 @item @emph{Return value}:
2400 The return value is of type @code{REAL(*)} or @code{COMPLEX(*)}.
2401 The kind type parameter is the same as @var{X}.
2403 @item @emph{Example}:
2404 @smallexample
2405 program test_log
2406   real(8) :: x = 1.0_8
2407   complex :: z = (1.0, 2.0)
2408   x = log(x)
2409   z = log(z)
2410 end program test_log
2411 @end smallexample
2413 @item @emph{Specific names}:
2414 @multitable @columnfractions .24 .24 .24 .24
2415 @item Name            @tab Argument          @tab Return type       @tab Option
2416 @item @code{ALOG(X)}  @tab @code{REAL(4) X}  @tab @code{REAL(4)}    @tab f95, gnu
2417 @item @code{DLOG(X)}  @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab f95, gnu
2418 @item @code{CLOG(X)}  @tab @code{COMPLEX(4) X}  @tab @code{COMPLEX(4)}    @tab f95, gnu
2419 @item @code{ZLOG(X)}  @tab @code{COMPLEX(8) X}  @tab @code{COMPLEX(8)}    @tab f95, gnu
2420 @item @code{CDLOG(X)} @tab @code{COMPLEX(8) X}  @tab @code{COMPLEX(8)}    @tab f95, gnu
2421 @end multitable
2422 @end table
2426 @node LOG10
2427 @section @code{LOG10} --- Base 10 logarithm function
2428 @findex @code{LOG10} intrinsic
2429 @findex @code{ALOG10} intrinsic
2430 @findex @code{DLOG10} intrinsic
2431 @cindex logarithm
2433 @table @asis
2434 @item @emph{Description}:
2435 @code{LOG10(X)} computes the base 10 logarithm of @var{X}.
2437 @item @emph{Option}:
2438 f95, gnu
2440 @item @emph{Class}:
2441 elemental function
2443 @item @emph{Syntax}:
2444 @code{X = LOG10(X)}
2446 @item @emph{Arguments}:
2447 @multitable @columnfractions .15 .80
2448 @item @var{X} @tab The type shall be @code{REAL(*)} or
2449 @code{COMPLEX(*)}.
2450 @end multitable
2452 @item @emph{Return value}:
2453 The return value is of type @code{REAL(*)} or @code{COMPLEX(*)}.
2454 The kind type parameter is the same as @var{X}.
2456 @item @emph{Example}:
2457 @smallexample
2458 program test_log10
2459   real(8) :: x = 10.0_8
2460   x = log10(x)
2461 end program test_log10
2462 @end smallexample
2464 @item @emph{Specific names}:
2465 @multitable @columnfractions .24 .24 .24 .24
2466 @item Name            @tab Argument          @tab Return type       @tab Option
2467 @item @code{ALOG10(X)}  @tab @code{REAL(4) X}  @tab @code{REAL(4)}    @tab f95, gnu
2468 @item @code{DLOG10(X)}  @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab f95, gnu
2469 @end multitable
2470 @end table
2474 @node SIN
2475 @section @code{SIN} --- Sine function 
2476 @findex @code{SIN} intrinsic
2477 @findex @code{DSIN} intrinsic
2478 @findex @code{ZSIN} intrinsic
2479 @findex @code{CDSIN} intrinsic
2480 @cindex sine
2482 @table @asis
2483 @item @emph{Description}:
2484 @code{SIN(X)} computes the sine of @var{X}.
2486 @item @emph{Option}:
2487 f95, gnu
2489 @item @emph{Class}:
2490 elemental function
2492 @item @emph{Syntax}:
2493 @code{X = SIN(X)}
2495 @item @emph{Arguments}:
2496 @multitable @columnfractions .15 .80
2497 @item @var{X} @tab The type shall be @code{REAL(*)} or
2498 @code{COMPLEX(*)}.
2499 @end multitable
2501 @item @emph{Return value}:
2502 The return value has same type and king than @var{X}.
2504 @item @emph{Example}:
2505 @smallexample
2506 program test_sin
2507   real :: x = 0.0
2508   x = sin(x)
2509 end program test_sin
2510 @end smallexample
2512 @item @emph{Specific names}:
2513 @multitable @columnfractions .24 .24 .24 .24
2514 @item Name            @tab Argument          @tab Return type       @tab Option
2515 @item @code{DSIN(X)}  @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab f95, gnu
2516 @item @code{CSIN(X)}  @tab @code{COMPLEX(4) X}  @tab @code{COMPLEX(4)}    @tab f95, gnu
2517 @item @code{ZSIN(X)}  @tab @code{COMPLEX(8) X}  @tab @code{COMPLEX(8)}    @tab f95, gnu
2518 @item @code{CDSIN(X)} @tab @code{COMPLEX(8) X}  @tab @code{COMPLEX(8)}    @tab f95, gnu
2519 @end multitable
2520 @end table
2524 @node SINH
2525 @section @code{SINH} --- Hyperbolic sine function 
2526 @findex @code{SINH} intrinsic
2527 @findex @code{DSINH} intrinsic
2528 @cindex hyperbolic sine
2530 @table @asis
2531 @item @emph{Description}:
2532 @code{SINH(X)} computes the hyperbolic sine of @var{X}.
2534 @item @emph{Option}:
2535 f95, gnu
2537 @item @emph{Class}:
2538 elemental function
2540 @item @emph{Syntax}:
2541 @code{X = SINH(X)}
2543 @item @emph{Arguments}:
2544 @multitable @columnfractions .15 .80
2545 @item @var{X} @tab The type shall be @code{REAL(*)}.
2546 @end multitable
2548 @item @emph{Return value}:
2549 The return value is of type @code{REAL(*)}.
2551 @item @emph{Example}:
2552 @smallexample
2553 program test_sinh
2554   real(8) :: x = - 1.0_8
2555   x = sinh(x)
2556 end program test_sinh
2557 @end smallexample
2559 @item @emph{Specific names}:
2560 @multitable @columnfractions .24 .24 .24 .24
2561 @item Name            @tab Argument          @tab Return type       @tab Option
2562 @item @code{DSINH(X)} @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab f95, gnu
2563 @end multitable
2564 @end table
2568 @node SQRT
2569 @section @code{SQRT} --- Square-root function
2570 @findex @code{SQRT} intrinsic
2571 @findex @code{DSQRT} intrinsic
2572 @findex @code{CSQRT} intrinsic
2573 @findex @code{ZSQRT} intrinsic
2574 @findex @code{CDSQRT} intrinsic
2575 @cindex square-root
2577 @table @asis
2578 @item @emph{Description}:
2579 @code{SQRT(X)} computes the square root of @var{X}.
2581 @item @emph{Option}:
2582 f95, gnu
2584 @item @emph{Class}:
2585 elemental function
2587 @item @emph{Syntax}:
2588 @code{X = SQRT(X)}
2590 @item @emph{Arguments}:
2591 @multitable @columnfractions .15 .80
2592 @item @var{X} @tab The type shall be @code{REAL(*)} or
2593 @code{COMPLEX(*)}.
2594 @end multitable
2596 @item @emph{Return value}:
2597 The return value is of type @code{REAL(*)} or @code{COMPLEX(*)}.
2598 The kind type parameter is the same as @var{X}.
2600 @item @emph{Example}:
2601 @smallexample
2602 program test_sqrt
2603   real(8) :: x = 2.0_8
2604   complex :: z = (1.0, 2.0)
2605   x = sqrt(x)
2606   z = sqrt(z)
2607 end program test_sqrt
2608 @end smallexample
2610 @item @emph{Specific names}:
2611 @multitable @columnfractions .24 .24 .24 .24
2612 @item Name            @tab Argument          @tab Return type       @tab Option
2613 @item @code{DSQRT(X)}  @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab f95, gnu
2614 @item @code{CSQRT(X)}  @tab @code{COMPLEX(4) X}  @tab @code{COMPLEX(4)}    @tab f95, gnu
2615 @item @code{ZSQRT(X)}  @tab @code{COMPLEX(8) X}  @tab @code{COMPLEX(8)}    @tab f95, gnu
2616 @item @code{CDSQRT(X)} @tab @code{COMPLEX(8) X}  @tab @code{COMPLEX(8)}    @tab f95, gnu
2617 @end multitable
2618 @end table
2622 @node TAN
2623 @section @code{TAN} --- Tangent function
2624 @findex @code{TAN} intrinsic
2625 @findex @code{DTAN} intrinsic
2626 @cindex tangent
2628 @table @asis
2629 @item @emph{Description}:
2630 @code{TAN(X)} computes the tangent of @var{X}.
2632 @item @emph{Option}:
2633 f95, gnu
2635 @item @emph{Class}:
2636 elemental function
2638 @item @emph{Syntax}:
2639 @code{X = TAN(X)}
2641 @item @emph{Arguments}:
2642 @multitable @columnfractions .15 .80
2643 @item @var{X} @tab The type shall be @code{REAL(*)}.
2644 @end multitable
2646 @item @emph{Return value}:
2647 The return value is of type @code{REAL(*)}.  The kind type parameter is
2648 the same as @var{X}.
2650 @item @emph{Example}:
2651 @smallexample
2652 program test_tan
2653   real(8) :: x = 0.165_8
2654   x = tan(x)
2655 end program test_tan
2656 @end smallexample
2658 @item @emph{Specific names}:
2659 @multitable @columnfractions .24 .24 .24 .24
2660 @item Name            @tab Argument          @tab Return type       @tab Option
2661 @item @code{DTAN(X)}  @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab f95, gnu
2662 @end multitable
2663 @end table
2667 @node TANH
2668 @section @code{TANH} --- Hyperbolic tangent function 
2669 @findex @code{TANH} intrinsic
2670 @findex @code{DTANH} intrinsic
2671 @cindex hyperbolic tangent
2673 @table @asis
2674 @item @emph{Description}:
2675 @code{TANH(X)} computes the hyperbolic tangent of @var{X}.
2677 @item @emph{Option}:
2678 f95, gnu
2680 @item @emph{Class}:
2681 elemental function
2683 @item @emph{Syntax}:
2684 @code{X = TANH(X)}
2686 @item @emph{Arguments}:
2687 @multitable @columnfractions .15 .80
2688 @item @var{X} @tab The type shall be @code{REAL(*)}.
2689 @end multitable
2691 @item @emph{Return value}:
2692 The return value is of type @code{REAL(*)} and lies in the range
2693 @math{ - 1 \leq tanh(x) \leq 1 }.
2695 @item @emph{Example}:
2696 @smallexample
2697 program test_tanh
2698   real(8) :: x = 2.1_8
2699   x = tanh(x)
2700 end program test_tanh
2701 @end smallexample
2703 @item @emph{Specific names}:
2704 @multitable @columnfractions .24 .24 .24 .24
2705 @item Name            @tab Argument          @tab Return type       @tab Option
2706 @item @code{DTANH(X)} @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab f95, gnu
2707 @end multitable
2708 @end table
2712 @comment gen   eoshift
2713 @comment 
2714 @comment gen   epsilon
2715 @comment 
2716 @comment gen   etime
2717 @comment sub   etime
2718 @comment 
2719 @comment sub   exit
2720 @comment 
2721 @comment gen   exponent
2722 @comment 
2723 @comment gen   floor
2724 @comment 
2725 @comment sub   flush
2726 @comment 
2727 @comment gen   fnum
2728 @comment 
2729 @comment gen   fraction
2730 @comment 
2731 @comment gen   fstat
2732 @comment sub   fstat
2733 @comment 
2734 @comment sub   getarg
2735 @comment 
2736 @comment gen   getcwd
2737 @comment sub   getcwd
2738 @comment 
2739 @comment sub   getenv
2740 @comment 
2741 @comment gen   getgid
2742 @comment 
2743 @comment gen   getpid
2744 @comment 
2745 @comment gen   getuid
2746 @comment 
2747 @comment sub   get_command
2748 @comment 
2749 @comment sub   get_command_argument
2750 @comment 
2751 @comment sub   get_environment_variable
2752 @comment 
2753 @comment gen   huge
2754 @comment 
2755 @comment gen   iachar
2756 @comment 
2757 @comment gen   iand
2758 @comment 
2759 @comment gen   iargc
2760 @comment 
2761 @comment gen   ibclr
2762 @comment 
2763 @comment gen   ibits
2764 @comment 
2765 @comment gen   ibset
2766 @comment 
2767 @comment gen   ichar
2768 @comment 
2769 @comment gen   ieor
2770 @comment 
2771 @comment gen   index
2772 @comment 
2773 @comment gen   int
2774 @comment       ifix
2775 @comment       idint
2776 @comment 
2777 @comment gen   ior
2778 @comment 
2779 @comment gen   irand
2780 @comment 
2781 @comment gen   ishft
2782 @comment 
2783 @comment gen   ishftc
2784 @comment 
2785 @comment gen   kind
2786 @comment 
2787 @comment gen   lbound
2788 @comment 
2789 @comment gen   len
2790 @comment 
2791 @comment gen   len_trim
2792 @comment 
2793 @comment gen   lge
2794 @comment 
2795 @comment gen   lgt
2796 @comment 
2797 @comment gen   lle
2798 @comment 
2799 @comment gen   llt
2800 @comment 
2801 @comment gen   logical
2802 @comment 
2803 @comment gen   matmul
2804 @comment 
2805 @comment gen   max
2806 @comment       max0
2807 @comment       amax0
2808 @comment       amax1
2809 @comment       max1
2810 @comment       dmax1
2811 @comment 
2812 @comment gen   maxexponent
2813 @comment 
2814 @comment gen   maxloc
2815 @comment 
2816 @comment gen   maxval
2817 @comment 
2818 @comment gen   merge
2819 @comment 
2820 @comment gen   min
2821 @comment       min0
2822 @comment       amin0
2823 @comment       amin1
2824 @comment       min1
2825 @comment       dmin1
2826 @comment 
2827 @comment gen   minexponent
2828 @comment 
2829 @comment gen   minloc
2830 @comment 
2831 @comment gen   minval
2832 @comment 
2833 @comment gen   mod
2834 @comment       amod
2835 @comment       dmod
2836 @comment 
2837 @comment gen   modulo
2838 @comment 
2839 @comment sub   mvbits
2840 @comment 
2841 @comment gen   nearest
2842 @comment 
2843 @comment gen   nint
2844 @comment       idnint
2845 @comment 
2846 @comment gen   not
2847 @comment 
2848 @comment gen   null
2849 @comment 
2850 @comment gen   pack
2851 @comment 
2852 @comment gen   precision
2853 @comment 
2854 @comment gen   present
2855 @comment 
2856 @comment gen   product
2857 @comment 
2858 @comment gen   radix
2859 @comment 
2860 @comment gen   rand
2861 @comment       ran 
2862 @comment 
2863 @comment sub   random_number
2864 @comment 
2865 @comment sub   random_seed
2866 @comment 
2867 @comment gen   range
2868 @comment 
2869 @comment gen   real
2870 @comment       float
2871 @comment       sngl
2872 @comment 
2873 @comment gen   repeat
2874 @comment 
2875 @comment gen   reshape
2876 @comment 
2877 @comment gen   rrspacing
2878 @comment 
2879 @comment gen   scale
2880 @comment 
2881 @comment gen   scan
2882 @comment 
2883 @comment gen   second
2884 @comment sub   second
2885 @comment 
2886 @comment gen   selected_int_kind
2887 @comment 
2888 @comment gen   selected_real_kind
2889 @comment 
2890 @comment gen   set_exponent
2891 @comment 
2892 @comment gen   shape
2893 @comment 
2894 @comment gen   sign
2895 @comment       isign
2896 @comment       dsign
2897 @comment 
2898 @comment gen   size
2899 @comment 
2900 @comment gen   spacing
2901 @comment 
2902 @comment gen   spread
2903 @comment 
2904 @comment sub   srand
2905 @comment 
2906 @comment gen   stat
2907 @comment sub   stat
2908 @comment 
2909 @comment gen   sum
2910 @comment 
2911 @comment gen   system
2912 @comment sub   system
2913 @comment 
2914 @comment sub system_clock
2915 @comment 
2916 @comment gen   tiny
2917 @comment 
2918 @comment gen   transfer
2919 @comment 
2920 @comment gen   transpose
2921 @comment 
2922 @comment gen   trim
2923 @comment 
2924 @comment gen   ubound
2925 @comment 
2926 @comment gen   umask
2927 @comment sub   umask
2928 @comment 
2929 @comment gen   unlink
2930 @comment sub   unlink
2931 @comment 
2932 @comment gen   unpack
2933 @comment 
2934 @comment gen   verify