Fortran 95 fixed process

zhaozj2021-02-16  78

The Fortran 95 is proposed as a standard, which means that any Fortran 95 compiler implements version, must be able to provide them: 115 solid processes, including 109 solid functions and 6 solid sub-routines. Of course, there is no exclusion that there are many compilers.

Table 14-1 Process Name of the Process and the corresponding variable element attribute

Class process name

Process name and its change

Process variable element type

ABS

ABS (a)

Cabs (a)

DABS (a)

IABS (A)

Default real

Default

Double precision

Default integer

ACOS

ACOS (X)

Dacos (X)

Default real

Double precision

AIMAG

AIMAG (Z)

Default

Aint

AINT (a)

DINT (a)

Default real

Double precision

Anint

Anint (a)

DNINT (a)

Default real

Double precision

Asin

Asin (x)

DSIN (X)

Default real

Double precision

Atan

Atan (a)

DTAN (a)

Default real

Double precision

Atan2

Atan2 (a)

DTAN2 (A)

Default real

Double precision

Charr

* Char (i)

Default integer

COS

COS (x)

CCOS (x)

DCOS (x)

Default real

Default

Double precision

Conjg

Conjg (x)

Default

Cosh

Cosh (x)

DCOSH (X)

Default real

Double precision

DIM

DIM (X, Y)

IDIM (X, Y)

Default real

Default integer

DPROD

DPROD (X, Y)

Default real

EXP

Exp (x)

CEXP (X)

DEXP (X)

Default real

Default

Double precision

IChar

* IChar (c)

Default character type

Index

Index (String, Substring)

Default character type

Int

* Int (a)

* IFix (a)

* IDint (a)

Default real

Default real

Double precision

Len

Len (String)

Default character type

LGE

* LGE (String_a, String_B)

Default character type

LGT

* LGT (String_a, String_B)

Default character type

LLE

* LLE (String_a, String_B)

Default character type

LLT

* LLT (String_a, String_B)

Default character type

Log

Alog (x)

Clog (x)

Dlog (x)

Default real

Default

Double precision

Log10

Alog10 (x)

DLOG10 (X)

Default real

Double precision

Max

Note 1

Note 2

* Max0 (A1, A2, A3, ...)

* AMAX1 (A1, A2, A3, ...)

* DMAX1 (A1, A2, A3, ...)

* Max1 (A1, A2, A3, ...)

* AMAX0 (A1, A2, A3, ...)

Default integer

Default real

Double precision

Default real

Default integer

MIN

Note 1

Note 2

* Min0 (A1, A2, A3, ...)

* Amin1 (A1, A2, A3, ...)

* Dmin1 (A1, A2, A3, ...)

* Min1 (A1, A2, A3, ...)

* Amin0 (A1, A2, A3, ...)

Default integer

Default real

Double precision

Default real

Default integer

MOD

MOD (A, P)

AMOD (A, P)

DMOD (A, P)

Default integer

Default real

Double precision

Nort

Nint (a)

IDnint (a)

Default real

Double precision

REAL

* Real (a)

* Float (a)

* SNGL (a)

Default integer

Default integer

Double precision

Sign

SIGN (A, B)

Dsign (a, b)

Isign (A, B)

Default real

Double precision

Default integer

Sin

Sin (x)

Csin (x)

DSIN (X)

Default real

Default

Double precision

Sinh

SINH (X)

DSINH (x)

Default real

Double precision

SQRT

SQRT (x)

CSQRT (x)

SDQRT (X)

Default real

Default

Double precision

Tan

Tan (x)

DTAN (X)

Default real

Double precision

Tanh

Tanh (x)

DTANH (X)

Default real

Double precision

Note 1: This function does not have the corresponding class process name, which is the default integer.

Note 2: This function does not have the corresponding class process name, which is the default real.

Note 3: The function marked as an asterisk * cannot be used as the real.

Note 4: Some procedures are the same as their class process name.

Table 14-2 Name of array query functions and return values

Function name

return value

Allocated

Distribution state of the variable element array

LBound

One array or array of lower bounds

Shape

The number of elements of arrays at each dimension

Size

The number of arrays, that is, the number of all elements

Ubound

One array or an array of upstemics

Table 14-3 Numerical mode query function name and return value

Function name

return value

DIGITS

N value in integer mode and real-mode formula

Epsilon

Transverse

Value

Hue

The maximum value that can be represented according to the integer mode and the real number mode

Minexponent

Minimum E value that can be achieved in real variable yuan

MaxExponent

The maximum E value that can be achieved by real variation

Precision

Real or plural 10 enrollment accuracy

Radix

The base value in the integer mode and real-mode formula

Range

Integer, real or plural 10-en-powerful range

Tiny

Minimal positive value achieved by real variable yuan

note:

● These functions do not need to be predefined.

● They are all types of processes because they can be used for any type of real-beam.

● In addition to EPSILON, MINEXPONENT, MAXEXPONENT these three functions, they can be used for arbitrary type integer.

Table 14-4 Name and return value of digital operation functions

Function name

return value

Exponent

Real value real mode represents the E value inside the formula

FRAction

Real value of the fractional part

Nearest

The value of the system can be expressed in a given direction is closest to the first variable element

Rrspacing

Countdown of the minimum spacing near the vicinity

Scale

Replace the E value with a given value

Set_exponent

Set the E value to a given value

Spacing

Minimum absolute spacing near the vicinity

These seven functions can only be applied to real numbers, which can be any type of real value, and are both a gradual function.

Table 14-5 The name of the conversion function and the return value

Function name

return value

Achar

Character in the specified location of the ASCII character set

AIMAG

Multiple ingredient

Aint

Truncate a real number as a real integer

Anint

Truncate a real number as the closest real shape

Charr

Character in the specified location of the system character set

CMPLX

Compared with the changed energy

Conjg

Composition of complex variable

Dble

Double-precision value corresponding to the change

Iachar

Specify the position in the ASCII character set

IBITS

Sub strings in the integer changed elements represented by the position

IChar

Specify the position in the system character set

Int

Variable elements are truncated

Logical

Logical value corresponding to the change

Nort

Truncate a real number as the closest value REAL

Real value corresponding to the change

Table 14-6 Numerical calculation function name and return value

Function name

return value

ABS

Defolute value

ACOS

Anti-cavity

Asin

Anti-synthetic value

Atan

Anti-rotate cut value

Atan2

Multi-angle curve value of complex variable energy (X, Y)

Ceiling

Minimum integer value greater than or equal to variable

COS

Change the cosine value

Cosh

Corresponding dichroic cosine value

DIM

If the difference between 2 variable elements is positive, the difference is returned, otherwise it returns 0

DOT_PRODUCT

2 rank of array of arrays 1

DPROD

2 single-precision value double precision product

EXP

Natural index function

Floor

The maximum integer value of less than or equal to the variable value

Log

Natural logarithmic function

Log10

Logarithmic function at 10

Matmul

Matrix product

Max

A maximum value in a value collection

MIN

Minimum value in a value collection

MOD

The expensive function, the symbol is consistent with the first symbolic symbol

MODULO

The remainder, the symbol is consistent with the second variable.

Sign

Give a given value given symbol

Sin

Strine value

Sinh

Supper sinus sine

SQRT

Core root

Tan

Variable value

Tanh

Changed dual-band positive cutting value

Table 14-7 Name of characters and return values

Function name

return value

Adjustl

Move the space on the left of the string to its right

Adjustr

Move the space on the right side of the string to its left

Index

Location in a given string in a given string

Len_Trim

Delete the string length after the tail space

LGE

Comparison of greater or equal to the ASCII sequence

LGT

Comparison of larger than the ASCII sequence

LLE

Comparison of less than or equal based on ASCII sequences

LLT

Comparison of less than a sequence of ASCII sequences

Repeat

Repeat connection string

SCAN

Scan a string to get a given string where

TRIM

Delete strings obtained after the tail space

Verify

Give the character that does not belong to the specified character set inside the string

Table 14-8 Name of bit calculation function and return value

Function name

return value

Btest

Integer changed to the value of the specified bit

Iand

2 results of 2 logical AND operations

IBCLR

Take 0. the value of a designated bit of an integer changed

IBSET

Set the value on the specified bit of an integer change to 1

Ieor

The logic of two integer variable elements exclude the results of OR operations

IOR

Two integer variable elements logic contains the result of OR operations

Ishft

Logical shift

Ishftc

Logical loop displacement

NOT

Variable logic supplement

note:

● The calculation function is a class process in addition to LGE, LGT, LLE, LLT.

● Calculation function is a gradual process in addition to Dot_Product, Matmul, Repeat.

● The result of bit calculation functions is not portable.

Table 14-9 The name of the array simplification function and the return value

Function name

return value

All

If all elements of the array array are true, take true values.

Any

If there is a true value in the elements of the array array, take true values.

Count

The number of elements of the change in the elements of the elements are changed.

MaxVal

Maximum value among element elements

Minval

Minimum value in elements of the parameter array

PRODUCT

Elements of the elements of the elements

Sum

The elements of the parameter array

Table 14-10 The name of the array constructor and the return value

Function name

return value

Merge

Two suitable arrays in the control of the filter

Pack

Package a filtered array into a vector

Spread

Addition of dimensions by copying a dimension

Unpack

Restorined from one vector to a filtered array

3. Array recombinant function

The array restructuring function contains only one inquiry function RESHAPE, which is the array of elements of a rank 1 to a given shape.

4. Array Operation Function

Array Operation Functions rearrange the elements of the variable element array, and their names and return values ​​are shown in Table 14-11. Table 14-11 Name of the array operation function and return value

Function name

return value

Cshift

Circulating shift of array elements

Eoshift

Displacement of array elements

Transpose

Matrix transposition of the parameter

5. A number of positioning functions

The array positioning function gives the maximum or minimum value in the array element in an array, or in a certain dimension of the array, and the names, and return values ​​are shown in Table 14-12.

Table 14-12 Name of the array positioning function and the return value

Function name

return value

Maxloc

An array of rank 1 containing the largest element

Minloc

An array of rank 1 containing the minimum element

● CPU_TIME

The inherent sub-routine returns a processor time in seconds, which does not include a variable element having an INTENT attribute.

● DATE_AND_TIME

This inherent sub-routine returns the date and time information as some variable elements of the INTENT (OUT) attribute.

● MVBITS

This inherent sub-routine copies a binary code sequence from a integer data object to another integer data object.

The inherent sub-routine is the only substantial sub-routine.

● Random_Number

The inherent sub-routine returns a pseudo-random value or a pseudo-random array as the value of the change. The surface seems to be used as a function, but it actually has a post-efficiency, each of which affects the variable of the pseudo random number generator under which it is generated, so it is not a pure process. The inherent function must be a pure process.

● Random_seed

The inherent sub-routine also returns a pseudo-random value or a pseudo-random array as the value of the variable. However, it also allows specific initialization or restore the original value of the pseudo-random number generator under it.

● System_Clock

The inherent sub-routine returns the processor clock information in an integer, and there may be several formats, and can be used as a value of a variable element having an INTENT (OUT) attribute.

转载请注明原文地址:https://www.9cbs.com/read-17321.html

New Post(0)