HP 3000 Manuals

Summary of the Intrinsic Functions [ HP FORTRAN 77/iX Reference ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Reference

Summary of the Intrinsic Functions 

This section lists the intrinsic functions of HP FORTRAN 77.  Tables B-1
through B-6 show the definition of each function, the number of
arguments, the generic name for each group of functions, the specific
name for each function, the types of arguments allowed, and the argument
and function type.  Table B-7 lists the random number generator functions
available in FORTRAN.

Table B-8 lists the built-in functions available in FORTRAN.

For complete descriptions of many of the FORTRAN intrinsic functions, see
"Function Descriptions" .

          Table B-1.  Arithmetic Functions 

--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
|   Function    |  Description  | No.  of  |   Generic   |  Specific   |    Type of    |    Type of    |
|               |               |  Args.   |    Name     |    Name     |   Argument    |   Function    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Absolute      | |a|           |    1     | ABS         | JIABS*      | INTEGER*4     | INTEGER*4     |
| value         |               |          | IABS        | HABS*       | INTEGER*2     | INTEGER*2     |
|               |               |          |             | IIABS*      | INTEGER*2     | INTEGER*2     |
|               |               |          |             | BABS*       | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             | ABS         | REAL*4        | REAL*4        |
|               |               |          |             | DABS        | REAL*8        | REAL*8        |
|               |               |          |             | QABS*       | REAL*16       | REAL*16       |
|               |               |          |             | CABS        | COMPLEX*8     | REAL*4        |
|               |               |          |             | ZABS*       | COMPLEX*16    | REAL*8        |
|               |               |          |             | CDABS*      | COMPLEX*16    | REAL*8        |
|               |               |          |             | JIABS*      | INTEGER*4     | INTEGER*4     |
|               |               |          |             | HABS*       | INTEGER*2     | INTEGER*2     |
|               |               |          |             | IIABS*      | INTEGER*2     | INTEGER*2     |
|               |               |          |             | BABS*       | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Remaindering  | a-INT(a/b)*b  |    2     | MOD         | JMOD*       | INTEGER*4     | INTEGER*4     |
|               |               |          |             | HMOD*       | INTEGER*2     | INTEGER*2     |
|               |               |          |             | IMOD*       | INTEGER*2     | INTEGER*2     |
|               |               |          |             | BMOD*       | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             | AMOD        | REAL*4        | REAL*4        |
|               |               |          |             | DMOD        | REAL*8        | REAL*8        |
|               |               |          |             | QMOD*       | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
| * indicates that the function is an extension to the ANSI 77 standard.                               |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
|                                     (Continued on the next page)                                     |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------

          Table B-1.  Arithmetic Functions (cont.) 

--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
|   Function    |  Description  | No.  of  |   Generic   |  Specific   |    Type of    |    Type of    |
|               |               |  Args.   |    Name     |    Name     |   Argument    |   Function    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Transfer of   | |a| if b>=0   |    2     | SIGN        | JISIGN*     | INTEGER*4     | INTEGER*4     |
| sign          |               |          | ISIGN       | HSIGN*      | INTEGER*2     | INTEGER*2     |
|               | -|a| if b<0   |          |             | IISIGN*     | INTEGER*2     | INTEGER*2     |
|               |               |          |             | BSIGN*      | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             | ----        | REAL*4        | REAL*4        |
|               |               |          |             | DSIGN       | REAL*8        | REAL*8        |
|               |               |          |             | QSIGN*      | REAL*16       | REAL*16       |
|               |               |          |             | JISIGN*     | INTEGER*4     | INTEGER*4     |
|               |               |          |             | HSIGN*      | INTEGER*2     | INTEGER*2     |
|               |               |          |             | IISIGN*     | INTEGER*2     | INTEGER*2     |
|               |               |          |             | BSIGN*      | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Positive      | a-b if a>b    |    2     | DIM         | JIDIM*      | INTEGER*4     | INTEGER*4     |
| difference    |               |          | IDIM        | HDIM*       | INTEGER*2     | INTEGER*2     |
|               | 0 if a<b      |          |             | IIDIM*      | INTEGER*2     | INTEGER*2     |
|               |               |          |             | BDIM*       | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             | DIM         | REAL*4        | REAL*4        |
|               |               |          |             | DDIM        | REAL*8        | REAL*8        |
|               |               |          |             | QDIM*       | REAL*16       | REAL*16       |
|               |               |          |             | JIDIM*      | INTEGER*4     | INTEGER*4     |
|               |               |          |             | HDIM*       | INTEGER*2     | INTEGER*2     |
|               |               |          |             | IIDIM*      | INTEGER*2     | INTEGER*2     |
|               |               |          |             | BDIM*       | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| REAL*8        | a*b           |    2     |             | DPROD       | REAL*4        | REAL*8        |
| product of    |               |          |             |             |               |               |
| REAL*4        |               |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| REAL*16       | a*b           |    2     |             | QPROD*      | REAL*8        | REAL*16       |
| product of    |               |          |             |             |               |               |
| REAL*8        |               |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Choosing      | max (a,b,...) |   >=2    | MAX         | IMAX0*      | INTEGER*2     | INTEGER*2     |
| largest value |               |          | MAX0        | JMAX0*      | INTEGER*4     | INTEGER*4     |
|               |               |          | MAX1        | AMAX1       | REAL*4        | REAL*4        |
|               |               |          | AMAX0       | DMAX1       | REAL*8        | REAL*8        |
|               |               |          |             | QMAX1*      | REAL*16       | REAL*16       |
|               |               |          |             | IMAX0       | INTEGER*2     | INTEGER*2     |
|               |               |          |             | JMAX0       | INTEGER*4     | INTEGER*4     |
|               |               |          |             | IMAX1*      | REAL*4        | INTEGER*2     |
|               |               |          |             | JMAX1*      | REAL*4        | INTEGER*4     |
|               |               |          |             | AIMAX0*     | INTEGER*2     | REAL*4        |
|               |               |          |             | AJMAX0*     | INTEGER*4     | REAL*4        |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
| * indicates that the function is an extension to the ANSI 77 standard.                               |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
|                                     (Continued on the next page)                                     |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------

          Table B-1.  Arithmetic Functions (cont.) 

--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
|   Function    |  Description  | No.  of  |   Generic   |  Specific   |    Type of    |    Type of    |
|               |               |  Args.   |    Name     |    Name     |   Argument    |   Function    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Choosing      | min (a,b,...) |   >=2    | MIN         | ----        | LOGICAL*1     | LOGICAL*1     |
| smallest      |               |          | MIN0        | IMIN0*      | INTEGER*2     | INTEGER*2     |
| value         |               |          | MIN1        | JMIN0*      | INTEGER*4     | INTEGER*4     |
|               |               |          | AMIN0       | AMIN1       | REAL*4        | REAL*4        |
|               |               |          |             | DMIN1       | REAL*8        | REAL*8        |
|               |               |          |             | QMIN1*      | REAL*16       | REAL*16       |
|               |               |          |             | IMIN0       | INTEGER*2     | INTEGER*2     |
|               |               |          |             | JMIN0       | INTEGER*4     | INTEGER*4     |
|               |               |          |             | IMIN1*      | REAL*4        | INTEGER*2     |
|               |               |          |             | JMIN1*      | REAL*4        | INTEGER*4     |
|               |               |          |             | AIMIN0*     | INTEGER*2     | REAL*4        |
|               |               |          |             | AJMIN0*     | INTEGER*4     | REAL*4        |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Imaginary     | ai            |    1     | IMAG*       | AIMAG       | COMPLEX*8     | REAL*4        |
| part of a     |               |          |             | DIMAG*      | COMPLEX*16    | REAL*8        |
| complex       |               |          |             |             |               |               |
| argument      |               |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Conjugate of  | (ar,-ai)      |    1     | CONJG       | CONJG       | COMPLEX*8     | COMPLEX*8     |
| a complex     |               |          |             | DCONJG*     | COMPLEX*16    | COMPLEX*16    |
| argument      |               |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Logical       |               |    2     | IAND*       | JIAND*      | INTEGER*4     | INTEGER*4     |
| product       |               |          |             | HIAND*      | INTEGER*2     | INTEGER*2     |
|               |               |          |             | IIAND*      | INTEGER*2     | INTEGER*2     |
|               |               |          |             | BIAND*      | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Logical sum   |               |    2     | IOR*        | JIOR*       | INTEGER*4     | INTEGER*4     |
|               |               |          |             | HIOR*       | INTEGER*2     | INTEGER*2     |
|               |               |          |             | IIOR*       | INTEGER*2     | INTEGER*2     |
|               |               |          |             | BIOR*       | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Exclusive OR  |               |    2     | IXOR*       | JIEOR*      | INTEGER*4     | INTEGER*4     |
|               |               |          | or          | JIXOR*      | INTEGER*4     | INTEGER*4     |
|               |               |          | IEOR*       | HIEOR*      | INTEGER*2     | INTEGER*2     |
|               |               |          |             | IIEOR*      | INTEGER*2     | INTEGER*2     |
|               |               |          |             | IIXOR*      | INTEGER*2     | INTEGER*2     |
|               |               |          |             | BIEOR*      | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             | BIXOR*      | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Complement    |               |    1     | NOT*        | JNOT*       | INTEGER*4     | INTEGER*4     |
|               |               |          |             | HNOT*       | INTEGER*2     | INTEGER*2     |
|               |               |          |             | INOT*       | INTEGER*2     | INTEGER*2     |
|               |               |          |             | BNOT*       | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
| * indicates that the function is an extension to the ANSI 77 standard.                               |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------

          Table B-2.  Bit Manipulation Functions 

--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
|   Function    |  Description  | No.  of  |   Generic   |  Specific   |    Type of    |    Type of    |
|               |               |  Args.   |    Name     |    Name     |   Argument    |   Function    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Bit test      |               |    2     | BTEST*      | BJTEST*     | INTEGER*4     | LOGICAL*4     |
|               |               |          |             | HTEST*      | INTEGER*2     | LOGICAL*2     |
|               |               |          |             | BITEST*     | INTEGER*2     | LOGICAL*2     |
|               |               |          |             | BBTEST*     | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Bit set       |               |    2     | IBSET*      | JIBSET*     | INTEGER*4     | INTEGER*4     |
|               |               |          |             | HBSET*      | INTEGER*2     | INTEGER*2     |
|               |               |          |             | IIBSET*     | INTEGER*2     | INTEGER*2     |
|               |               |          |             | BBSET*      | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Bit clear     |               |    2     | IBCLR*      | JIBCLR*     | INTEGER*4     | INTEGER*4     |
|               |               |          |             | HBCLR*      | INTEGER*2     | INTEGER*2     |
|               |               |          |             | IIBCLR*     | INTEGER*2     | INTEGER*4     |
|               |               |          |             | BBCLR*      | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Bit move      |               |    5     | MVBITS*     | MVBITS*     | INTEGER*4     | ----          |
|               |               |          |             | HMVBITS*    | INTEGER*2     | ----          |
|               |               |          |             | BMVBITS*    | LOGICAL*1     | ----          |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Logical shift |               |    2     | ISHFT*      | JISHFT*     | INTEGER*4     | INTEGER*4     |
|               |               |          |             | HSHFT*      | INTEGER*2     | INTEGER*2     |
|               |               |          |             | IISHFT*     | INTEGER*2     | INTEGER*2     |
|               |               |          |             | BSHFT*      | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Circular      |               |    3     | ISHFTC*     | JISHFTC*    | INTEGER*4     | INTEGER*4     |
| shift         |               |          |             | HSHFTC*     | INTEGER*2     | INTEGER*2     |
|               |               |          |             | IISHFTC*    | INTEGER*2     | INTEGER*4     |
|               |               |          |             | BSHFTC*     | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Bit           |               |    3     | IBITS*      | JIBITS*     | INTEGER*4     | INTEGER*4     |
| extraction    |               |          |             | HBITS*      | INTEGER*2     | INTEGER*2     |
|               |               |          |             | IIBITS*     | INTEGER*2     | INTEGER*4     |
|               |               |          |             | BBITS*      | LOGICAL*1     | LOGICAL*1     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
| * indicates that the function is an extension to the ANSI 77 standard.                               |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------

          Table B-3.  Character Functions 
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
|   Function    |  Description  | No.  of  |   Generic   |  Specific   |    Type of    |    Type of    |
|               |               |  Args.   |    Name     |    Name     |   Argument    |   Function    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Conversion to |               |    1     | CHAR        | ----        | INTEGER*4     | CHARACTER     |
| character     |               |          |             | ----        | INTEGER*2     | CHARACTER     |
|               |               |          |             | ----        | LOGICAL*1     | CHARACTER     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Conversion to |               |    1     |             | ICHAR       | CHARACTER     | INTEGER*4     |
| INTEGER*4     |               |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Conversion to |               |    1     |             | INUM*       | CHARACTER     | INTEGER*2     |
| INTEGER*2     |               |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Conversion to |               |    1     |             | JNUM*       | CHARACTER     | INTEGER*4     |
| INTEGER*4     |               |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Conversion to |               |    1     |             | RNUM*       | CHARACTER     | REAL*4        |
| REAL*4        |               |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Conversion to |               |    1     |             | DNUM*       | CHARACTER     | REAL*8        |
| REAL*8        |               |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Conversion to |               |    1     |             | QNUM*       | CHARACTER     | REAL*16       |
| REAL*16       |               |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Length        | Length of     |    1     |             | LEN         | CHARACTER     | INTEGER*4     |
|               | character     |          |             |             |               |               |
|               | entry         |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Index of a    | Location of   |    2     |             | INDEX       | CHARACTER     | INTEGER*4     |
| substring     | substring b   |          |             |             |               |               |
|               | in string a   |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Lexically     | a>=b          |    2     |             | LGE         | CHARACTER     | LOGICAL*4     |
| greater than  |               |          |             |             |               |               |
| or equal      |               |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Lexically     | a>b           |    2     |             | LGT         | CHARACTER     | LOGICAL*4     |
| greater than  |               |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Lexically     | a<=b          |    2     |             | LLE         | CHARACTER     | LOGICAL*4     |
| less than or  |               |          |             |             |               |               |
| equal         |               |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Lexically     | a<b           |    2     |             | LLT         | CHARACTER     | LOGICAL*4     |
| less than     |               |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
| * indicates that the function is an extension to the ANSI 77 standard.                               |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------

          Table B-4.  Numeric Conversion Functions 

--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
|   Function    |  Description  | No.  of  |   Generic   |  Specific   |    Type of    |    Type of    |
|               |               |  Args.   |    Name     |    Name     |   Argument    |   Function    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Type          | Conversion to |    1     | INT         | ----        | LOGICAL*1*    | INTEGER*4     |
| conversion    | INTEGER*2 and |          | IDINT       | IINT*       | REAL*4        | INTEGER*2     |
|               | INTEGER*4     |          | IQINT*      | JINT*       | REAL*4        | INTEGER*4     |
|               | using INT(a)  |          |             | IIDINT*     | REAL*8        | INTEGER*2     |
|               |               |          |             | JIDINT*     | REAL*8        | INTEGER*4     |
|               |               |          |             | IIQINT*     | REAL*16       | INTEGER*2     |
|               |               |          |             | JIQINT*     | REAL*16       | INTEGER*4     |
|               |               |          |             | ----        | COMPLEX*8     | INTEGER*2     |
|               |               |          |             | ----        | COMPLEX*8     | INTEGER*4     |
|               |               |          |             | ----        | COMPLEX*16    | INTEGER*2     |
|               |               |          |             | ----        | COMPLEX*16    | INTEGER*4     |
|               |               |          |             | IIDINT*     | REAL*8        | INTEGER*2     |
|               |               |          |             | JIDINT*     | REAL*8        | INTEGER*4     |
|               |               |          |             | IIQINT*     | REAL*16       | INTEGER*2     |
|               |               |          |             | JIQINT*     | REAL*16       | INTEGER*4     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Type          | Conversion to |    1     | ZEXT*27     |             | LOGICAL*1*    | INTEGER*2     |
| conversion    | INTEGER*2 and |          | IZEXT*      |             | LOGICAL*2     | INTEGER*2     |
|               | INTEGER*4;    |          | JZEXT*      |             | INTEGER*2     | INTEGER*2     |
|               | zero-extend   |          |             |             | LOGICAL*1     | INTEGER*4     |
|               | using ZEXT(i) |          |             |             | LOGICAL*2     | INTEGER*4     |
|               |               |          |             |             | LOGICAL*4     | INTEGER*4     |
|               |               |          |             |             | INTEGER*2     | INTEGER*4     |
|               |               |          |             |             | INTEGER*4     | INTEGER*4     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Type          | Conversion to |    1     | REAL        | ----        | LOGICAL*1*    | REAL*4        |
| conversion    | REAL*4        |          | FLOAT       | FLOATI*     | INTEGER*2     | REAL*4        |
|               |               |          |             | FLOATJ*     | INTEGER*4     | REAL*4        |
|               |               |          |             | ----        | REAL*4        | REAL*4        |
|               |               |          |             | SNGL        | REAL*8        | REAL*4        |
|               |               |          |             | SNGLQ*      | REAL*16       | REAL*4        |
|               |               |          |             | ----        | COMPLEX*8     | REAL*4        |
|               |               |          |             | ----        | COMPLEX*16    | REAL*4        |
|               |               |          |             | FLOATI      | INTEGER*2     | REAL*4        |
|               |               |          |             | FLOATJ      | INTEGER*4     | REAL*4        |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
|                                     (Continued on the next page)                                     |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------

          Table B-4.  Numeric Conversion Functions (cont.) 

--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
|   Function    |  Description  | No.  of  |   Generic   |  Specific   |    Type of    |    Type of    |
|               |               |  Args.   |    Name     |    Name     |   Argument    |   Function    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Type          | Conversion to |    1     | DBLE        | ----        | LOGICAL*1*    | REAL*8        |
| conversion    | REAL*8        |          | DFLOAT      | DFLOTI      | INTEGER*2     | REAL*8        |
|               |               |          |             | DFLOTJ      | INTEGER*4     | REAL*8        |
|               |               |          |             | ----        | REAL*4        | REAL*8        |
|               |               |          |             | DBLE        | REAL*8        | REAL*8        |
|               |               |          |             | ----        | REAL*16       | REAL*8        |
|               |               |          |             | DBLEQ*      | COMPLEX*8     | REAL*8        |
|               |               |          |             | ----        | COMPLEX*16    | REAL*8        |
|               |               |          |             | DREAL*      | INTEGER*2     | REAL*8        |
|               |               |          |             | DFLOTI      | INTEGER*4     | REAL*8        |
|               |               |          |             | DFLOTJ      |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
| * indicates that the function is an extension to the ANSI 77 standard.                               |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
|                                     (Continued on the next page)                                     |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------

          Table B-4.  Numeric Conversion Functions (cont.) 

--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
|   Function    |  Description  | No.  of  |   Generic   |  Specific   |    Type of    |    Type of    |
|               |               |  Args.   |    Name     |    Name     |   Argument    |   Function    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Type          | Conversion to |    1     | QEXT*       | ----        | LOGICAL*1     | REAL*16       |
| conversion    | REAL*16       |          | QFLOAT      | QFLOTI      | INTEGER*2     | REAL*16       |
|               |               |          |             | QFLOTJ      | INTEGER*4     | REAL*16       |
|               |               |          |             | ----        | REAL*4        | REAL*16       |
|               |               |          |             | ----        | REAL*8        | REAL*16       |
|               |               |          |             | QEXTD*      | REAL*16       | REAL*16       |
|               |               |          |             | ----        | COMPLEX*8     | REAL*16       |
|               |               |          |             | ----        | COMPLEX*16    | REAL*16       |
|               |               |          |             | ----        | INTEGER*2     | REAL*16       |
|               |               |          |             | QFLOTI      | INTEGER*4     | REAL*16       |
|               |               |          |             | QFLOTJ      | INTEGER*4     | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Type          | Conversion to | 1 or 2** | CMPLX       | ----        | LOGICAL*1*    | COMPLEX*8     |
| conversion    | COMPLEX*8     |          |             | ----        | INTEGER*2     | COMPLEX*8     |
|               |               |          |             | ----        | INTEGER*4     | COMPLEX*8     |
|               |               |          |             | ----        | REAL*4        | COMPLEX*8     |
|               |               |          |             | ----        | REAL*8        | COMPLEX*8     |
|               |               |          |             | ----        | REAL*16       | COMPLEX*8     |
|               |               |          |             | ----        | COMPLEX*8     | COMPLEX*8     |
|               |               |          |             | ----        | COMPLEX*16    | COMPLEX*8     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Type          | Conversion to | 1 or 2** | DCMPLX*     | ----        | LOGICAL*1*    | COMPLEX*16    |
| conversion    | COMPLEX*16    |          |             | ----        | INTEGER*2     | COMPLEX*16    |
|               |               |          |             | ----        | INTEGER*4     | COMPLEX*16    |
|               |               |          |             | ----        | REAL*4        | COMPLEX*16    |
|               |               |          |             | ----        | REAL*8        | COMPLEX*16    |
|               |               |          |             | ----        | REAL*16       | COMPLEX*16    |
|               |               |          |             | ----        | COMPLEX*8     | COMPLEX*16    |
|               |               |          |             | ----        | COMPLEX*16    | COMPLEX*16    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Type          | Conversion to |    1     |             | ICHAR       | CHARACTER     | INTEGER*4     |
| conversion    | INTEGER*4     |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Type          | Conversion to |    1     | CHAR        | ----        | INTEGER*4     | CHARACTER     |
| conversion    | character     |          |             | ----        | INTEGER*2     | CHARACTER     |
|               |               |          |             | ----        | LOGICAL*1*    | CHARACTER     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
| * indicates that the function is an extension to the ANSI 77 standard.                               |
|                                                                                                      |
| ** if type COMPLEX*8 or COMPLEX*16 is used, there can only be one argument.                          |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
|                                     (Continued on the next page)                                     |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------

          Table B-4.  Numeric Conversion Functions (cont.) 
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
|   Function    |  Description  | No.  of  |   Generic   |  Specific   |    Type of    |    Type of    |
|               |               |  Args.   |    Name     |    Name     |   Argument    |   Function    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Truncation    | REAL(INT(a))  |    1     | AINT        | AINT        | REAL*4        | REAL*4        |
|               |               |          | IDINT       | DINT        | REAL*8        | REAL*8        |
|               | DBLE(INT(a))  |          | IQINT*      | DDINT*      | REAL*8        | REAL*8        |
|               |               |          |             | QINT*       | REAL*16       | REAL*16       |
|               |               |          |             | IIDINT*     | REAL*8        | INTEGER*2     |
|               |               |          |             | JIDINT*     | REAL*8        | INTEGER*4     |
|               |               |          |             | IIQINT*     | REAL*16       | INTEGER*2     |
|               |               |          |             | JIQINT*     | REAL*16       | INTEGER*4     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Nearest whole | INT(a+.5)     |    1     | ANINT       | ANINT       | REAL*4        | REAL*4        |
| number        | if a>=0       |          |             | DNINT       | REAL*8        | REAL*8        |
|               |               |          |             | QNINT*      | REAL*16       | REAL*16       |
|               | INT(a-.5)     |          |             |             |               |               |
|               | if a<0        |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Nearest       | INT(a+.5)     |    1     | NINT        | ININT*      | REAL*4        | INTEGER*2     |
| integer       | if a>=0       |          | IDNINT      | JNINT*      | REAL*4        | INTEGER*4     |
|               |               |          | IQNINT*     | IIDNNT*     | REAL*8        | INTEGER*2     |
|               | INT(a-.5)     |          |             | JIDNNT*     | REAL*8        | INTEGER*4     |
|               | if a<0        |          |             | IIQNNT*     | REAL*16       | INTEGER*2     |
|               |               |          |             | JIQNNT*     | REAL*16       | INTEGER*4     |
|               |               |          |             | IIDNNT*     | REAL*8        | INTEGER*2     |
|               |               |          |             | JIDNNT*     | REAL*8        | INTEGER*4     |
|               |               |          |             | IIQNNT*     | REAL*16       | INTEGER*2     |
|               |               |          |             | JIQNNT*     | REAL*16       | INTEGER*4     |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
| * indicates that the function is an extension to the ANSI 77 standard.                               |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------

          Table B-5.  Transcendental Functions 

--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
|   Function    |  Description  | No.  of  |   Generic   |  Specific   |    Type of    |    Type of    |
|               |               |  Args.   |    Name     |    Name     |   Argument    |   Function    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Sine          | sin(a)        |    1     | SIN         | SIN         | REAL*4        | REAL*4        |
|               |               |          |             | DSIN        | REAL*8        | REAL*8        |
|               |               |          |             | QSIN*       | REAL*16       | REAL*16       |
|               |               |          |             | CSIN        | COMPLEX*8     | COMPLEX*8     |
|               |               |          |             | ZSIN*       | COMPLEX*16    | COMPLEX*16    |
|               |               |          |             | CDSIN*      | COMPLEX*16    | COMPLEX*16    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Cosine        | cos(a)        |    1     | COS         | COS         | REAL*4        | REAL*4        |
|               |               |          |             | DCOS        | REAL*8        | REAL*8        |
|               |               |          |             | QCOS*       | REAL*16       | REAL*16       |
|               |               |          |             | CCOS        | COMPLEX*8     | COMPLEX*8     |
|               |               |          |             | ZCOS*       | COMPLEX*16    | COMPLEX*16    |
|               |               |          |             | CDCOS*      | COMPLEX*16    | COMPLEX*16    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Tangent       | tan(a)        |    1     | TAN         | TAN         | REAL*4        | REAL*4        |
|               |               |          |             | DTAN        | REAL*8        | REAL*8        |
|               |               |          |             | QTAN*       | REAL*16       | REAL*16       |
|               |               |          |             | CTAN        | COMPLEX*8     | COMPLEX*8     |
|               |               |          |             | ZTAN*       | COMPLEX*16    | COMPLEX*16    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Arcsine       | asin(a)       |    1     | ASIN        | ASIN        | REAL*4        | REAL*4        |
|               |               |          |             | DASIN       | REAL*8        | REAL*8        |
|               |               |          |             | QASIN*      | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Arccosine     | acos(a)       |    1     | ACOS        | ACOS        | REAL*4        | REAL*4        |
|               |               |          |             | DACOS       | REAL*8        | REAL*8        |
|               |               |          |             | QACOS*      | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Arctangent    | atan(a)       |    1     | ATAN        | ATAN        | REAL*4        | REAL*4        |
|               |               |    2     | ATAN2       | DATAN       | REAL*8        | REAL*8        |
|               |               |          |             | QATAN*      | REAL*16       | REAL*16       |
|               | atan(a/b)     |          |             | ATAN2       | REAL*4        | REAL*4        |
|               |               |          |             | DATAN2      | REAL*8        | REAL*8        |
|               |               |          |             | QATAN2*     | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
| * indicates that the function is an extension to the ANSI 77 standard.                               |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
|                                     (Continued on the next page)                                     |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------

          Table B-5.  Transcendental Functions (cont.) 

--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
|   Function    |  Description  | No.  of  |   Generic   |  Specific   |    Type of    |    Type of    |
|               |               |  Args.   |    Name     |    Name     |   Argument    |   Function    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Sine (degree) | sin(a)        |    1     | SIND*       | SIND*       | REAL*4        | REAL*4        |
|               |               |          |             | DSIND*      | REAL*8        | REAL*8        |
|               |               |          |             | QSIND*      | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Cosine        | cos(a)        |    1     | COSD*       | COSD*       | REAL*4        | REAL*4        |
| (degree)      |               |          |             | DCOSD*      | REAL*8        | REAL*8        |
|               |               |          |             | QCOSD*      | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Tangent       | tan(a)        |    1     | TAND*       | TAND*       | REAL*4        | REAL*4        |
| (degree)      |               |          |             | DTAND*      | REAL*8        | REAL*8        |
|               |               |          |             | QTAND*      | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Arcsine       | asin(a)       |    1     | ASIND*      | ASIND*      | REAL*4        | REAL*4        |
| (degree)      |               |          |             | DASIND*     | REAL*8        | REAL*8        |
|               |               |          |             | QASIND*     | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Arccosine     | acos(a)       |    1     | ACOSD*      | ACOSD*      | REAL*4        | REAL*4        |
| (degree)      |               |          |             | DACOSD*     | REAL*8        | REAL*8        |
|               |               |          |             | QACOSD*     | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Arctangent    | atan(a)       |    1     | ATAND*      | ATAND*      | REAL*4        | REAL*4        |
| (degree)      |               |    2     | ATAN2D*     | DATAND*     | REAL*8        | REAL*8        |
|               |               |          |             | QATAND*     | REAL*16       | REAL*16       |
|               | atan(a/b)     |          |             | ATAN2D*     | REAL*4        | REAL*4        |
|               |               |          |             | DATAN2D*    | REAL*8        | REAL*8        |
|               |               |          |             | QATAN2D*    | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
| * indicates that the function is an extension to the ANSI 77 standard.                               |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
|                                     (Continued on the next page)                                     |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------

          Table B-5.  Transcendental Functions (cont.) 

--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
|   Function    |  Description  | No.  of  |   Generic   |  Specific   |    Type of    |    Type of    |
|               |               |  Args.   |    Name     |    Name     |   Argument    |   Function    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Hyperbolic    | sinh(a)       |    1     | SINH        | SINH        | REAL*4        | REAL*4        |
| sine          |               |          |             | DSINH       | REAL*8        | REAL*8        |
|               |               |          |             | QSINH*      | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Hyperbolic    | cosh(a)       |    1     | COSH        | COSH        | REAL*4        | REAL*4        |
| cosine        |               |          |             | DCOSH       | REAL*8        | REAL*8        |
|               |               |          |             | QCOSH*      | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Hyperbolic    | tanh(a)       |    1     | TANH        | TANH        | REAL*4        | REAL*4        |
| tangent       |               |          |             | DTANH       | REAL*8        | REAL*8        |
|               |               |          |             | QTANH*      | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Hyperbolic    | asinh(a)      |    1     | ASINH*      | ASINH*      | REAL*4        | REAL*4        |
| arcsine       |               |          |             | DASINH*     | REAL*8        | REAL*8        |
|               |               |          |             | QASINH*     | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Hyperbolic    | acosh(a)      |    1     | ACOSH*      | ACOSH*      | REAL*4        | REAL*4        |
| arccosine     |               |          |             | DACOSH*     | REAL*8        | REAL*8        |
|               |               |          |             | QACOSH*     | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Hyperbolic    | arccos(a)     |    1     | ATANH*      | ATANH*      | REAL*4        | REAL*4        |
| arctangent    |               |          |             | DATANH*     | REAL*8        | REAL*8        |
|               |               |          |             | QATANH*     | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
| * indicates that the function is an extension to the ANSI 77 standard.                               |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
|                                     (Continued on the next page)                                     |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------

          Table B-5.  Transcendental Functions (cont.) 

--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
|   Function    |  Description  | No.  of  |   Generic   |  Specific   |    Type of    |    Type of    |
|               |               |  Args.   |    Name     |    Name     |   Argument    |   Function    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Square root   | a**(1/2)      |    1     | SQRT        | SQRT        | REAL*4        | REAL*4        |
|               |               |          |             | DSQRT       | REAL*8        | REAL*8        |
|               |               |          |             | QSQRT*      | REAL*16       | REAL*16       |
|               |               |          |             | CSQRT       | COMPLEX*8     | COMPLEX*8     |
|               |               |          |             | ZSQRT*      | COMPLEX*16    | COMPLEX*16    |
|               |               |          |             | CDSQRT*     | COMPLEX*16    | COMPLEX*16    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Exponential   | e**a          |    1     | EXP         | EXP         | REAL*4        | REAL*4        |
|               |               |          |             | DEXP        | REAL*8        | REAL*8        |
|               |               |          |             | QEXP*       | REAL*16       | REAL*16       |
|               |               |          |             | CEXP        | COMPLEX*8     | COMPLEX*8     |
|               |               |          |             | ZEXP*       | COMPLEX*16    | COMPLEX*16    |
|               |               |          |             | CDEXP*      | COMPLEX*16    | COMPLEX*16    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Natural       | log(a)        |    1     | LOG         | ALOG        | REAL*4        | REAL*4        |
| logarithm     |               |          |             | DLOG        | REAL*8        | REAL*8        |
|               |               |          |             | QLOG*       | REAL*16       | REAL*16       |
|               |               |          |             | CLOG        | COMPLEX*8     | COMPLEX*8     |
|               |               |          |             | ZLOG*       | COMPLEX*16    | COMPLEX*16    |
|               |               |          |             | CDLOG*      | COMPLEX*16    | COMPLEX*16    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Common        | log10(a)      |    1     | LOG10       | ALOG10      | REAL*4        | REAL*4        |
| logarithm     |               |          |             | DLOG10      | REAL*8        | REAL*8        |
|               |               |          |             | QLOG10*     | REAL*16       | REAL*16       |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
| * indicates that the function is an extension to the ANSI 77 standard.                               |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------

          Table B-6.  Miscellaneous Functions 

--------------------------------------------------------------------------------------------------------
|               |             |          |               |             |               |               |
|   Function    | Description | No.  of  |    Generic    |  Specific   |    Type of    |    Type of    |
|               |             |  Args.   |     Name      |    Name     |   Argument    |   Function    |
|               |             |          |               |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |             |          |               |             |               |               |
| Byte address  | baddress(a) |    1     | BADDRESS*     | ----        | Any           | INTEGER*4     |
|               |             |          |               |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |             |          |               |             |               |               |
| Byte address  |             |    1     | %LOC*         | ----        | Any           | INTEGER*4     |
|               |             |          |               |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |             |          |               |             |               |               |
| Bytes of      | SIZEOF      |    1     | SIZEOF        | ---         | Any except    | INTEGER*4     |
| storage       |             |          |               |             | dynamic or    |               |
|               |             |          |               |             | assumed-size  |               |
|               |             |          |               |             | array.        |               |
|               |             |          |               |             |               |               |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
| * indicates that the function is an extension to the ANSI 77 standard.                               |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------

          Table B-7.  Built-in Functions 

--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
|   Function    |  Description  | No.  of  |   Generic   |  Specific   |    Type of    |    Type of    |
|               |               |  Args.   |    Name     |    Name     |   Argument    |   Function    |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Pass argument |               |    1     | %REF*       | ----        | Any           | ----          |
| by reference  |               |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|               |               |          |             |             |               |               |
| Pass argument |               |    1     | %VAL*       | ----        | Any           | ----          |
| by value      |               |          |             |             |               |               |
|               |               |          |             |             |               |               |
--------------------------------------------------------------------------------------------------------
|                                                                                                      |
| * indicates that the function is an extension to the ANSI 77 standard.                               |
|                                                                                                      |
--------------------------------------------------------------------------------------------------------

Notes for Tables B-1 through B-8 

   1.  For a of type INTEGER*4 or INTEGER*2, INT(a) = a.  For a of type
       REAL*4 or REAL*8, there are two cases: 

       A. If |a|<1, INT(a)=0.

       B. If |a|>1, INT(a) is the integer whose magnitude is the
       magnitude of a and whose sign is the same as that of a.

       For example:

            INT(-3.7) = -3

       For a of type COMPLEX*8, INT(a) is the value obtained by applying
       the above rule to the real part of a.

       For a of type REAL*4, IFIX(a) is the same as INT(a).  IFIX behaves
       differently when either NOSTANDARD INTRINSICS or HP9000_300 is on.
       See chapter 7 for more information.

       If SHORT is on, IFIX returns an INTEGER*2; if LONG is on, it
       returns an INTEGER*4.

   2.  For a of type REAL*4, REAL(a) is a.  For a of type INTEGER*4 or
       REAL*8, REAL(a) is as much precision of the significant part of a
       as a REAL*4 datum can contain.  For a of type COMPLEX*8, REAL(a)
       is the real part of a. 

       For a of type INTEGER*4, FLOAT(a) is the same as REAL(a).

   3.  For a of type REAL*8, DBLE(a) is a.  For a of type INTEGER*4 or
       REAL*4, DBLE(a) is as much precision of the significant part of a
       as a REAL*8 datum can contain.  For a of type COMPLEX*8, DBLE(a)
       is as much precision of the significant part of the real part of a
       as a REAL*8 datum can contain.  For a of type COMPLEX*16, DBLE(a)
       is the real part of a. 

   4.  CMPLX can have one or two arguments.  If there is one argument, it
       can be of type INTEGER*4, REAL*4, REAL*8, or COMPLEX*8.  If there
       are two arguments, they must both be of the same type and can be
       of type INTEGER*4, REAL*4, or REAL*8. 

       For a of type COMPLEX*8, CMPLX(a) is a.  For a of type INTEGER*4,
       REAL*4, or REAL*8, CMPLX(a) is the COMPLEX*8 value whose real part
       is REAL(a) and whose imaginary part is 0.  For a of type
       COMPLEX*16, CMPLX(a) is:

            CMPLX(REAL(a), REAL(IMAG(a)))

       CMPLX(a,b) is the COMPLEX*8 value whose real part is REAL(a) and
       whose imaginary part is REAL(b).

       These rules also apply to DCMPLX. For a of type COMPLEX*8,
       DCMPLX(a) is: 

            DCMPLX(DBLE(a), DBLE(IMAG(a)))

   5.  A COMPLEX*8 value is expressed as an ordered pair of REAL*4s or
       REAL*8s (ar,ai), where ar is the real part and ai the imaginary
       part.  ABS or CABS is defined as: 

            SQRT (ar^+2^- + ai^+2^-)

   6.  All angles in trigonometric functions are expressed in radians. 

   7.  CONJG is defined as (ar,ai); see note 5. 

   8.  ISHFT(a,b) is defined as the value of the first argument (a)
       shifted by the number of bit positions designated by the second
       argument (b).  If b>0, shift left; if b<0, shift right; if b=0, no
       shift.  If b>15 or b<-15 (a is INTEGER*2), or b>31 or b<-31 (a is
       INTEGER*4), the result is 0.  Bits shifted out from the left or
       right end are lost, and 0's are shifted in from the opposite end.
       The type of the result is the same as the type of a. 

   9.  IXOR and IEOR are defined as the bitwise modulo-2 sum (exclusive
       OR) of the two arguments.  That is, if the bits match, the result
       bit is 1; otherwise, it is 0. 

  10.  ICHAR converts from a character to an integer, based on the
       internal representation of the character.  Characters in the ASCII
       character set have the standard ASCII values. 

       The value of ICHAR(a) is an integer in the range 0 <= ICHAR(a) <=
       255, where a is an argument of type character and length 1.

       If a is longer than one character, the first character is used.

  11.  INDEX(a,b) returns an integer value representing the starting
       position within character string a of a substring identical to
       string b.  If b occurs more than once within a, INDEX(a,b) returns
       the starting position of the first occurrence. 

       If b does not occur in a, the value 0 is returned.  If LEN(a) <
       LEN(b), 0 is also returned.

  12.  LGE(a,b) returns the value true if a=b or if a follows b in ASCII
       collating sequence; otherwise it returns the value false. 

       LGT(a,b) returns the value true if a follows b in ASCII collating
       sequence; otherwise it returns the value false. 

       LLE(a,b) returns the value true if a=b or if a precedes b in ASCII
       collating sequence; otherwise it returns the value false. 

       LLT(a,b) returns the value true if a precedes b in ASCII collating
       sequence; otherwise it returns the value false. 

       If the operands for LGE, LGT, LLE, and LLT are of unequal length,
       the shorter operand is treated as if padded on the right with
       blanks to the length of the longer operand.

       In HP FORTRAN 77, LGE, LGT, LLE, and LLT behave exactly the same
       as .GE., .GT., .LE., and .LT. because HP computers use the
       standard ASCII character set.  The intrinsic functions should be
       used for code that might be ported to another system because they
       always obey the ASCII collating sequence.  Using the operators on
       another system may produce different results.  For example:

            LLT('9','A')

       is always true.  However:

            ('9' .LT. 'A')

       may be false on some systems.

       _________________________________________________________________ 

       NOTE  The NLS directive can change the results of these functions.
             See "NLS Directive" .

       _________________________________________________________________ 

  13.  As a MIL-STD-1753 standard extension to the ANSI 77 standard,
       ISHFTC(a,b,c) is defined as the right-most c bits of the argument
       a shifted circularly b places.  That is, the bits shifted out of
       one end are shifted into the opposite end.  No bits are lost.  The
       unshifted bits of the result are the same as the unshifted bits of
       the argument a.  The absolute value of the argument b must be less
       than or equal to c.  The argument c must be greater than or equal
       to 1 and less than or equal to 16 if a is INTEGER*2, or less than
       or equal to 32 if a is INTEGER*4.

  14.  The functions IBITS, BTEST, IBSET, IBCLR, and MVBITS are defined
       by the MIL-STD-1753 definition, in which bit positions are
       numbered from right to left, with the rightmost (least
       significant) bit numbered 0.  Note that this numbering is not
       necessarily used in presenting the data formats in the
       machine-specific supplements to this manual. 

  15.  As a MIL-STD-1753 standard extension to the ANSI 77 standard, bit
       subfields can be extracted from a field.  Bit subfields are
       referenced by specifying a bit position and a length.  Bit
       positions within a numeric storage unit are numbered from right to
       left, and the rightmost bit position is numbered 0.  Bit fields
       cannot extend from one numeric storage unit into another numeric
       storage unit, and the length of a field must be greater than zero. 

       The function IBITS(a,b,c) extracts a subfield of c bits in length
       from a, starting with bit position b and extending left c bits.
       The result field is right-justified and the remaining bits set to
       0.  The value of b+c must be less than or equal to 16 if a is
       INTEGER*2, or less than or equal to 32 if a is INTEGER*4.

  16.  As a MIL-STD-1753 standard extension to the ANSI 77 standard, the
       bit move subroutine CALL MVBITS (a,b,c,d,e) moves c bits from
       positions b through b+c-1 of argument a to positions e through
       e+c-1 of argument d.  The portion of argument d not affected by
       the movement of bits remain unchanged.  All arguments are integer
       expressions, except d, which must be a variable or array element.
       Arguments a and d are permitted to be the same numeric storage
       unit.  The values of b+c and e+c must be less than or equal to the
       lengths of a and b respectively. 

  17.  As a MIL-STD-1753 standard extension to the ANSI 77 standard,
       individual bits of a numeric storage unit can be tested and
       changed with the bit processing routines described in Notes 18,
       19, and 20.  Each function has two arguments, a and b, which are
       integer expressions.  a specifies the binary pattern.  b specifies
       the bit position (rightmost bit is 0).

  18.  The function BTEST is a logical function.  The bth bit of argument
       a is tested.  If it is 1, the value of the function is true; if it
       is 0, the value is false.  If b is greater than or equal to 16 or
       32 (depending on whether a is a 16- or 32-bit element), the result
       is false. 

  19.  The result of the function IBSET(a,b) is equal to the value of a
       with the bth bit set to 1.  If b is greater than or equal to 16 or
       32 (depending on whether a is a 16- or 32-bit element), the result
       is a. 

  20.  The result of the function IBCLR(a,b) is equal to the value of a
       with the bth bit set to 0.  If b is greater than or equal to 16 or
       32 (depending on whether a is a 16- or 32-bit element), the result
       is a. 

  21.  In AINT(a) or ANINT(a), if INT(a) or INT(a+.5) is outside the
       range of integers, then these intrinsics return numbers equal to
       either the most positive or the most negative value (on the
       particular system) having the same type as the type of their
       argument, a. 

  22.  The ZEXT function expands any fixed-point argument to either an
       INTEGER*2 or INTEGER*4 without extending the sign of the argument
       (that is, the high-order bits are set to zero).  The generic name
       ZEXT behaves like IZEXT when the SHORT directive is enabled.  ZEXT
       behaves like JZEXT when SHORT is not enabled. 

  23.  The size of the integer function returned by BADDRESS is system
       dependent. 

  24.  The argument of SIN, DSIN, COS, DCOS, TAN, or DTAN must be in
       radians, which are treated as modulo 2* pi .  The argument of
       DSIND, COSD, DCOSD, TAND, or DTAND must be in degrees, which are
       treated as modulo 360. 

  25.  The result of ASIN, DASIN, ACOS, DACOS, ATAN, DATAN, ATAN2, or
       DATAN2 is in radians.  The result of ASIND, DASIND, ACOSD, DACOSD,
       ATAND, DATAND, ATAN2D , or DATAN2D is in degrees.

  26.  MVBITS and SRAND are actually subroutine calls and not functions,
       and therefore do not have a resulting type. 

  27.  If SHORT is enabled, ZEXT behaves like IZEXT and returns an
       INTEGER*2 result.  If SHORT is not enabled, ZEXT behaves like
       JZEXT and returns an INTEGER*4 result.

  28.  Use $NOSTANDARD INTRINSICS for compatibility compatibility with
       DEC/VAX FORTRAN 77 and other vendors' FORTRAN compilers.  Use
       $HP9000_300 INTRINSICS for series 300 compatibility.



MPE/iX 5.0 Documentation