Sun Studio 12：Fortran 库参考

# 2.1 标准 Fortran 95 的通用内函数

PRESENT

## 2.1.2 数值函数

ABS (A)

AIMAG (Z)

AINT (A [, KIND])

ANINT (A [, KIND])

CEILING (A [, KIND])

CMPLX (X [, Y, KIND])

CONJG (Z)

DBLE (A)

DIM (X, Y)

DPROD (X, Y)

FLOOR (A [, KIND])

INT (A [, KIND])

MAX (A1, A2 [, A3,...])

MIN (A1, A2 [, A3,...])

MOD (A, P)

MODULO (A, P)

NINT (A [, KIND])

REAL (A [, KIND])

SIGN (A, B)

ACOS (X)

ASIN (X)

ATAN (X)

ATAN2 (Y, X)

COS (X)

COSH (X)

EXP (X)

LOG (X)

LOG10 (X)

SIN (X)

SINH (X)

SQRT (X)

TAN (X)

TANH (X)

## 2.1.4 字符函数

ACHAR (I)

CHAR (I [, KIND])

IACHAR (C)

ICHAR (C)

INDEX (STRING, SUBSTRING [, BACK])

LEN_TRIM (STRING)

LGE (STRING_A, STRING_B)

LGT (STRING_A, STRING_B)

LLE (STRING_A, STRING_B)

LLT (STRING_A, STRING_B)

REPEAT (STRING, NCOPIES)

SCAN (STRING, SET [, BACK])

TRIM (STRING)

VERIFY (STRING, SET [, BACK])

LEN (STRING)

## 2.1.6 种类函数

KIND (X)

SELECTED_INT_KIND (R)

SELECTED_REAL_KIND ([P, R])

## 2.1.7 逻辑函数

LOGICAL (L [, KIND])

DIGITS (X)

EPSILON (X)

HUGE (X)

MAXEXPONENT (X)

MINEXPONENT (X)

PRECISION (X)

RANGE (X)

TINY (X)

BIT_SIZE (I)

## 2.1.10 位操作函数

BTEST (I, POS)

IAND (I, J)

IBCLR (I, POS)

IBITS (I, POS, LEN)

IBSET (I, POS)

IEOR (I, J)

IOR (I, J)

ISHFT (I, SHIFT)

ISHFTC (I, SHIFT [, SIZE])

NOT (I)

## 2.1.11 传送函数

TRANSFER (SOURCE, MOLD [, SIZE])

## 2.1.12 浮点处理函数

EXPONENT (X)

FRACTION (X)

NEAREST (X, S)

RRSPACING (X)

SCALE (X, I)

SET_EXPONENT (X, I)

SPACING (X)

## 2.1.13 向量和矩阵乘法函数

DOT_PRODUCT (VECTOR_A, VECTOR_B)

MATMUL (MATRIX_A, MATRIX_B)

## 2.1.15 数组查询函数

ALLOCATED (ARRAY)

LBOUND (ARRAY [, DIM])

SHAPE (SOURCE)

SIZE (ARRAY [, DIM])

UBOUND (ARRAY [, DIM])

## 2.1.18 数组处理函数

CSHIFT (ARRAY, SHIFT [, DIM])

EOSHIFT (ARRAY, SHIFT [, BOUNDARY, DIM]

TRANSPOSE (MATRIX)

## 2.1.20 指针关联状态函数

ASSOCIATED (POINTER [, TARGET])

NULL ([MOLD])

## 2.1.21 系统环境调节过程

COMMAND_ARGUMENT_COUNT ()

GET_COMMAND ([COMMAND, LENGTH, STATUS])

GET_COMMAND_ARGUMENT (NUMBER [, VALUE, LENGTH, STATUS])

GET_ENVIRONMENT_VARIABLE (NAME [, VALUE, LENGTH, STATUS, TRIM_NAME])

## 2.1.22 内子例程

CPU_TIME (TIME)

DATE_AND_TIME ([DATE, TIME,

ZONE, VALUES])

MVBITS (FROM, FROMPOS,

LEN, TO, TOPOS)

RANDOM_NUMBER (HARVEST)

RANDOM_SEED ([SIZE, PUT, GET])

SYSTEM_CLOCK ([COUNT,

COUNT_RATE, COUNT_MAX])

## 2.1.23 内函数的专用名称

ABS (A)

ABS (A)

ACOS (X)

ACOS (X)

AIMAG (Z)

AIMAG (Z)

AINT (A)

AINT (A)

ALOG (X)

LOG (X)

ALOG10 (X)

LOG10 (X)

AMAX0 (A1, A2 [, A3,...])

REAL (MAX (A1, A2 [, A3,...]))

AMAX1 (A1, A2 [, A3,...])

MAX (A1, A2 [, A3,...])

AMIN0 (A1, A2 [, A3,...])

REAL (MIN (A1, A2 [, A3,...]))

AMIN1 (A1, A2 [, A3,...])

MIN (A1, A2 [, A3,...])

AMOD (A, P)

MOD (A, P)

ANINT (A)

ANINT (A)

ASIN (X)

ASIN (X)

ATAN (X)

ATAN (X)

ATAN2 (Y, X)

ATAN2 (Y, X)

CABS (A)

ABS (A)

CCOS (X)

COS (X)

CEXP (X)

EXP (X)

CHAR (I)

CHAR (I)

CLOG (X)

LOG (X)

CONJG (Z)

CONJG (Z)

COS (X)

COS (X)

COSH (X)

COSH (X)

CSIN (X)

SIN (X)

CSQRT (X)

SQRT (X)

DABS (A)

ABS (A)

DACOS (X)

ACOS (X)

DASIN (X)

ASIN (X)

DATAN (X)

ATAN (X)

DATAN2 (Y, X)

ATAN2 (Y, X)

DCOS (X)

COS (X)

DCOSH (X)

COSH (X)

DDIM (X, Y)

DIM (X, Y)

DEXP (X)

EXP (X)

DIM (X, Y)

DIM (X, Y)

DINT (A)

AINT (A)

DLOG (X)

LOG (X)

DLOG10 (X)

LOG10 (X)

DMAX1 (A1, A2 [, A3,...])

MAX (A1, A2 [, A3,...])

DMIN1 (A1, A2 [, A3,...])

MIN (A1, A2 [, A3,...])

DMOD (A, P)

MOD (A, P)

DNINT (A)

ANINT (A)

DPROD (X, Y)

DPROD (X, Y)

DSIGN (A, B)

SIGN (A, B)

DSIN (X)

SIN (X)

DSINH (X)

SINH (X)

DSQRT (X)

SQRT (X)

DTAN (X)

TAN (X)

DTANH (X)

TANH (X)

EXP (X)

EXP (X)

FLOAT (A)

REAL (A)

IABS (A)

ABS (A)

ICHAR (C)

ICHAR (C)

IDIM (X, Y)

DIM (X, Y)

IDINT (A)

INT (A)

IDNINT (A)

NINT (A)

IFIX (A)

INT (A)

INDEX (STRING, SUBSTRING)

INDEX (STRING, SUBSTRING)

INT (A)

INT (A)

ISIGN (A, B)

SIGN (A, B)

LEN (STRING)

LEN (STRING)

LGE (STRING_A, STRING_B)

LGE (STRING_A, STRING_B)

LGT (STRING_A, STRING_B)

LGT (STRING_A, STRING_B)

LLE (STRING_A, STRING_B)

LLE (STRING_A, STRING_B)

LLT (STRING_A, STRING_B)

LLT (STRING_A, STRING_B)

MAX0 (A1, A2 [, A3,...])

MAX (A1, A2 [, A3,...])

MAX1 (A1, A2 [, A3,...])

INT (MAX (A1, A2 [, A3,...]))

MIN0 (A1, A2 [, A3,...])

MIN (A1, A2 [, A3,...])

MIN1 (A1, A2 [, A3,...])

INT (MIN (A1, A2 [, A3,...]))

MOD (A, P)

MOD (A, P)

NINT (A)

NINT (A)

REAL (A)

REAL (A)

SIGN (A, B)

SIGN (A, B)

SIN (X)

SIN (X)

SINH (X)

SINH (X)

SNGL (A)

REAL (A)

SQRT (X)

SQRT (X)

TAN (X)

TAN (X)

TANH (X)

TANH (X)