⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 intrinsic.texi

📁 理解和实践操作系统的一本好书
💻 TEXI
📖 第 1 页 / 共 5 页
字号:
This will cause the external routine @var{handler_print} to be calledafter 3 seconds.@end table@node ALL@section @code{ALL} --- All values in @var{MASK} along @var{DIM} are true @fnindex ALL@cindex array, apply condition@cindex array, condition testing@table @asis@item @emph{Description}:@code{ALL(MASK [, DIM])} determines if all the values are true in @var{MASK}in the array along dimension @var{DIM}.@item @emph{Standard}:F95 and later@item @emph{Class}:Transformational function@item @emph{Syntax}:@code{RESULT = ALL(MASK [, DIM])}@item @emph{Arguments}:@multitable @columnfractions .15 .70@item @var{MASK} @tab The type of the argument shall be @code{LOGICAL(*)} andit shall not be scalar.@item @var{DIM}  @tab (Optional) @var{DIM} shall be a scalar integerwith a value that lies between one and the rank of @var{MASK}.@end multitable@item @emph{Return value}:@code{ALL(MASK)} returns a scalar value of type @code{LOGICAL(*)} wherethe kind type parameter is the same as the kind type parameter of@var{MASK}.  If @var{DIM} is present, then @code{ALL(MASK, DIM)} returnsan array with the rank of @var{MASK} minus 1.  The shape is determined fromthe shape of @var{MASK} where the @var{DIM} dimension is elided. @table @asis@item (A)@code{ALL(MASK)} is true if all elements of @var{MASK} are true.It also is true if @var{MASK} has zero size; otherwise, it is false.@item (B)If the rank of @var{MASK} is one, then @code{ALL(MASK,DIM)} is equivalentto @code{ALL(MASK)}.  If the rank is greater than one, then @code{ALL(MASK,DIM)}is determined by applying @code{ALL} to the array sections.@end table@item @emph{Example}:@smallexampleprogram test_all  logical l  l = all((/.true., .true., .true./))  print *, l  call section  contains    subroutine section      integer a(2,3), b(2,3)      a = 1      b = 1      b(2,2) = 2      print *, all(a .eq. b, 1)      print *, all(a .eq. b, 2)    end subroutine sectionend program test_all@end smallexample@end table@node ALLOCATED@section @code{ALLOCATED} --- Status of an allocatable entity@fnindex ALLOCATED@cindex allocation, status@table @asis@item @emph{Description}:@code{ALLOCATED(X)} checks the status of whether @var{X} is allocated.@item @emph{Standard}:F95 and later@item @emph{Class}:Inquiry function@item @emph{Syntax}:@code{RESULT = ALLOCATED(X)}@item @emph{Arguments}:@multitable @columnfractions .15 .70@item @var{X}    @tab The argument shall be an @code{ALLOCATABLE} array.@end multitable@item @emph{Return value}:The return value is a scalar @code{LOGICAL} with the default logicalkind type parameter.  If @var{X} is allocated, @code{ALLOCATED(X)}is @code{.TRUE.}; otherwise, it returns @code{.FALSE.} @item @emph{Example}:@smallexampleprogram test_allocated  integer :: i = 4  real(4), allocatable :: x(:)  if (allocated(x) .eqv. .false.) allocate(x(i))end program test_allocated@end smallexample@end table@node AND@section @code{AND} --- Bitwise logical AND@fnindex AND@cindex bitwise logical and@cindex logical and, bitwise@table @asis@item @emph{Description}:Bitwise logical @code{AND}.This intrinsic routine is provided for backwards compatibility with GNU Fortran 77.  For integer arguments, programmers should considerthe use of the @ref{IAND} intrinsic defined by the Fortran standard.@item @emph{Standard}:GNU extension@item @emph{Class}:Function@item @emph{Syntax}:@code{RESULT = AND(I, J)}@item @emph{Arguments}:@multitable @columnfractions .15 .70@item @var{I} @tab The type shall be either @code{INTEGER(*)} or @code{LOGICAL}.@item @var{J} @tab The type shall be either @code{INTEGER(*)} or @code{LOGICAL}.@end multitable@item @emph{Return value}:The return type is either @code{INTEGER(*)} or @code{LOGICAL} aftercross-promotion of the arguments. @item @emph{Example}:@smallexamplePROGRAM test_and  LOGICAL :: T = .TRUE., F = .FALSE.  INTEGER :: a, b  DATA a / Z'F' /, b / Z'3' /  WRITE (*,*) AND(T, T), AND(T, F), AND(F, T), AND(F, F)  WRITE (*,*) AND(a, b)END PROGRAM@end smallexample@item @emph{See also}:F95 elemental function: @ref{IAND}@end table@node ANINT@section @code{ANINT} --- Nearest whole number@fnindex ANINT@fnindex DNINT@cindex ceiling@cindex rounding, ceiling@table @asis@item @emph{Description}:@code{ANINT(X [, KIND])} rounds its argument to the nearest whole number.@item @emph{Standard}:F77 and later@item @emph{Class}:Elemental function@item @emph{Syntax}:@code{RESULT = ANINT(X [, KIND])}@item @emph{Arguments}:@multitable @columnfractions .15 .70@item @var{X}    @tab The type of the argument shall be @code{REAL(*)}.@item @var{KIND} @tab (Optional) An @code{INTEGER(*)} initialization                      expression indicating the kind parameter of		      the result.@end multitable@item @emph{Return value}:The return value is of type real with the kind type parameter of theargument if the optional @var{KIND} is absent; otherwise, the kindtype parameter will be given by @var{KIND}.  If @var{X} is greater thanzero, then @code{ANINT(X)} returns @code{AINT(X+0.5)}.  If @var{X} isless than or equal to zero, then it returns @code{AINT(X-0.5)}.@item @emph{Example}:@smallexampleprogram test_anint  real(4) x4  real(8) x8  x4 = 1.234E0_4  x8 = 4.321_8  print *, anint(x4), dnint(x8)  x8 = anint(x4,8)end program test_anint@end smallexample@item @emph{Specific names}:@multitable @columnfractions .20 .20 .20 .25@item Name            @tab Argument         @tab Return type      @tab Standard@item @code{DNINT(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)}   @tab F77 and later@end multitable@end table@node ANY@section @code{ANY} --- Any value in @var{MASK} along @var{DIM} is true @fnindex ANY@cindex array, apply condition@cindex array, condition testing@table @asis@item @emph{Description}:@code{ANY(MASK [, DIM])} determines if any of the values in the logical array@var{MASK} along dimension @var{DIM} are @code{.TRUE.}.@item @emph{Standard}:F95 and later@item @emph{Class}:Transformational function@item @emph{Syntax}:@code{RESULT = ANY(MASK [, DIM])}@item @emph{Arguments}:@multitable @columnfractions .15 .70@item @var{MASK} @tab The type of the argument shall be @code{LOGICAL(*)} andit shall not be scalar.@item @var{DIM}  @tab (Optional) @var{DIM} shall be a scalar integerwith a value that lies between one and the rank of @var{MASK}.@end multitable@item @emph{Return value}:@code{ANY(MASK)} returns a scalar value of type @code{LOGICAL(*)} wherethe kind type parameter is the same as the kind type parameter of@var{MASK}.  If @var{DIM} is present, then @code{ANY(MASK, DIM)} returnsan array with the rank of @var{MASK} minus 1.  The shape is determined fromthe shape of @var{MASK} where the @var{DIM} dimension is elided. @table @asis@item (A)@code{ANY(MASK)} is true if any element of @var{MASK} is true;otherwise, it is false.  It also is false if @var{MASK} has zero size.@item (B)If the rank of @var{MASK} is one, then @code{ANY(MASK,DIM)} is equivalentto @code{ANY(MASK)}.  If the rank is greater than one, then @code{ANY(MASK,DIM)}is determined by applying @code{ANY} to the array sections.@end table@item @emph{Example}:@smallexampleprogram test_any  logical l  l = any((/.true., .true., .true./))  print *, l  call section  contains    subroutine section      integer a(2,3), b(2,3)      a = 1      b = 1      b(2,2) = 2      print *, any(a .eq. b, 1)      print *, any(a .eq. b, 2)    end subroutine sectionend program test_any@end smallexample@end table@node ASIN@section @code{ASIN} --- Arcsine function @fnindex ASIN@fnindex DASIN@cindex trigonometric function, sine, inverse@cindex sine, inverse@table @asis@item @emph{Description}:@code{ASIN(X)} computes the arcsine of its @var{X} (inverse of @code{SIN(X)}).@item @emph{Standard}:F77 and later@item @emph{Class}:Elemental function@item @emph{Syntax}:@code{RESULT = ASIN(X)}@item @emph{Arguments}:@multitable @columnfractions .15 .70@item @var{X} @tab The type shall be @code{REAL(*)}, and a magnitude that isless than one.@end multitable@item @emph{Return value}:The return value is of type @code{REAL(*)} and it lies in therange @math{-\pi / 2 \leq \asin (x) \leq \pi / 2}.  The kind typeparameter is the same as @var{X}.@item @emph{Example}:@smallexampleprogram test_asin  real(8) :: x = 0.866_8  x = asin(x)end program test_asin@end smallexample@item @emph{Specific names}:@multitable @columnfractions .20 .20 .20 .25@item Name            @tab Argument          @tab Return type       @tab Standard@item @code{DASIN(X)} @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab F77 and later@end multitable@item @emph{See also}:Inverse function: @ref{SIN}@end table@node ASINH@section @code{ASINH} --- Hyperbolic arcsine function@fnindex ASINH@fnindex DASINH@cindex area hyperbolic sine@cindex hyperbolic arcsine@cindex hyperbolic function, sine, inverse@cindex sine, hyperbolic, inverse@table @asis@item @emph{Description}:@code{ASINH(X)} computes the hyperbolic arcsine of @var{X} (inverse of @code{SINH(X)}).@item @emph{Standard}:GNU extension@item @emph{Class}:Elemental function@item @emph{Syntax}:@code{RESULT = ASINH(X)}@item @emph{Arguments}:@multitable @columnfractions .15 .70@item @var{X} @tab The type shall be @code{REAL(*)}, with @var{X} a real number.@end multitable@item @emph{Return value}:The return value is of type @code{REAL(*)} and it lies in therange @math{-\infty \leq \asinh (x) \leq \infty}.@item @emph{Example}:@smallexamplePROGRAM test_asinh  REAL(8), DIMENSION(3) :: x = (/ -1.0, 0.0, 1.0 /)  WRITE (*,*) ASINH(x)END PROGRAM@end smallexample@item @emph{Specific names}:@multitable @columnfractions .20 .20 .20 .25@item Name             @tab Argument          @tab Return type       @tab Standard@item @code{DASINH(X)} @tab @code{REAL(8) X}  @tab @code{REAL(8)}    @tab GNU extension.@end multitable@item @emph{See also}:Inverse function: @ref{SINH}@end table@node ASSOCIATED@section @code{ASSOCIATED} --- Status of a pointer or pointer/target pair @fnindex ASSOCIATED@cindex pointer, status@cindex association status@table @asis@item @emph{Description}:@code{ASSOCIATED(PTR [, TGT])} determines the status of the pointer @var{PTR}or if @var{PTR} is associated with the target @var{TGT}.@item @emph{Standard}:F95 and later@item @emph{Class}:Inquiry function@item @emph{Syntax}:@code{RESULT = ASSOCIATED(PTR [, TGT])}@item @emph{Arguments}:@multitable @columnfractions .15 .70@item @var{PTR} @tab @var{PTR} shall have the @code{POINTER} attribute andit can be of any type.@item @var{TGT} @tab (Optional) @var{TGT} shall be a @code{POINTER} ora @code{TARGET}.  It must have the same type, kind type parameter, andarray rank as @var{PTR}.@end multitableThe status of neither @var{PTR} nor @var{TGT} can be undefined.@item @emph{Return value}:@code{ASSOCIATED(PTR)} returns a scalar value of type @code{LOGICAL(4)}.There are several cases:@table @asis@item (A) If the optional @var{TGT} is not present, then @code{ASSOCIATED(PTR)}is true if @var{PTR} is associated with a target; otherwise, it returns false.@item (B) If @var{TGT} is present and a scalar target, the result is true if@var{TGT}is not a 0 sized storage sequence and the target associated with @var{PTR}occupies the same storage units.  If @var{PTR} is disassociated, then the result is false.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -