FORTRAN Reference Manual

Intrinsic Functions
FORTRAN Reference Manual528615-001
8-19
INT Function
sets N = 0, because the two variables are matched as follows:
password = 'impassable
^^^^^
'
try = 'able
^^^^^^^^^^^
'
Example of the INDEX Function
The following example returns a value of 1 for POSITION:
RECORD title
CHARACTER * 10 author
CHARACTER * 10 name
END RECORD
CHARACTER * 5 sub
sub = 'Ander'
title^author = 'Anderson'
position = INDEX (title^author, sub)
PRINT *, position
INT Function
The INT function returns a value of integer type.
The table below shows the argument and function type of the generic INT function and
its associated specific functions:
Syntax Argument Type Function Type
INT (x) Arithmetic* Integer
INT4 (x) Arithmetic* Integer*4
INT8 (x) Arithmetic* Integer*8
IFIX (x) Real Integer
IFIX4 (x) Real Integer*4
IFIX8 (x) Real Integer*8
IDINT (x) Double Precision Integer
IDINT4 (x) Double Precision Integer*4
IDINT8 (x) Double Precision Integer*8
x is an arithmetic expression.
* Arithmetic means the argument can be an integer, real, double precision, or complex number.