24.11.2014 Views

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Functions and Subroutines<br />

12.3.21 Index of a Substring<br />

Definition:<br />

Name:<br />

INDEX<br />

index(a1,a2) is location of substring a2 in string a1<br />

Usage:<br />

I ←INDEX(CH,CH)<br />

Notes: INDEX(x,y) returns the starting position of a substring in x which is identical to y.<br />

The position of the first such substring is returned. If y is not contained in x, zero is<br />

returned.<br />

12.3.22 Imaginary Part of Complex Number<br />

Definition:<br />

Name:<br />

IMAG (generic) †<br />

AIMAG<br />

ai<br />

Usage:<br />

R ←IMAG(C), D ←IMAG(Z)<br />

R ←AIMAG(C)<br />

DIMAG D ←DIMAG(Z) †<br />

Notes:<br />

A complex number is an ordered pair of real numbers, (ar,ai) where ar is the real<br />

part and ai is the imaginary part of the complex number.<br />

† is an extension to <strong>FORTRAN</strong> <strong>77</strong>.<br />

12.3.23 Conjugate of a Complex Number<br />

Definition:<br />

Name:<br />

(ar,-ai)<br />

Usage:<br />

CONJG (generic) † C ←CONJG(C), Z ←CONJG(Z)<br />

CONJG<br />

C ←CONJG(C)<br />

DCONJG Z ←DCONJG(Z) †<br />

Notes:<br />

A complex number is an ordered pair of real numbers, (ar,ai) where ar is the real<br />

part and ai is the imaginary part of the complex number.<br />

† is an extension to <strong>FORTRAN</strong> <strong>77</strong>.<br />

Intrinsic Functions 255

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!