HP 3000 Manuals

Invoking an Intrinsic Function [ HP FORTRAN 77/iX Reference ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Reference

Invoking an Intrinsic Function 

An intrinsic function is invoked when the function name and any argument
appear in an expression.  For example, the statement

     root = SQRT(value1 + value2)

invokes the function SQRT, which computes the square root of value1 +
value2.  The resulting square root is then assigned to the variable root.

Some intrinsics, such as MVBITS, are actually subroutines.  A subroutine
is invoked in the following way:

     CALL subroutine_name 

You can define and call your own function subprogram with the same name
as an intrinsic function.  However, the intrinsic function will be used
unless your function is declared as an external function with the
EXTERNAL statement.  Refer to your HP FORTRAN 77 Programmer's Guide for
information on defining your own function subprogram.

Declaring an intrinsic function in a type statement has no effect on the
type of the intrinsic function.  For example, the statements:

     INTEGER*4 float
     x = float(y)

do not change the data type of float to INTEGER*4; the type of float
remains REAL*4.  An IMPLICIT statement does not change the type of an
intrinsic function either.



MPE/iX 5.0 Documentation