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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>FORTRAN</strong> Statements<br />

2.14 COMPLEX Statement<br />

The COMPLEX statement is a type declaration statement and can be used to declare a name to be of type<br />

complex. The implicit type of the name, whether defined by the "first letter rule" (see the chapter entitled<br />

"Names, Data Types and Constants" on page 151) or by an IMPLICIT statement, is either confirmed or<br />

overridden. However, once a name has been declared to be of type complex, it cannot appear in another<br />

type declaration statement.<br />

There are various forms of the COMPLEX statement. The following sections describe them.<br />

2.14.1 Standard COMPLEX Statement<br />

<br />

COMPLEX name [,name] ...<br />

where:<br />

name<br />

is a variable name, array name, array declarator, symbolic name of a constant, function name or<br />

dummy procedure name.<br />

This form is the standard form of the COMPLEX statement.<br />

Example:<br />

DIMENSION C(-5:5)<br />

COMPLEX A, B(10), C<br />

In the previous example, A is defined to be a variable of type complex and B and C are defined to be arrays<br />

of type complex.<br />

2.14.2 Extended COMPLEX Statement: Length Specification<br />

COMPLEX[*len[,]] name [,name] ...<br />

where:<br />

name<br />

is one of the following forms:<br />

v[*len]<br />

a[*len](d)<br />

a(d)[*len]<br />

v<br />

is a variable name, array name, symbolic name of a constant, function name or dummy<br />

procedure name.<br />

COMPLEX Statement 33

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

Saved successfully!

Ooh no, something went wrong!