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.

<strong>Language</strong> <strong>Reference</strong><br />

a<br />

(d)<br />

len<br />

is an array name.<br />

is that part of the array declarator defining the dimensions of the array.<br />

is called the length specification and is an unsigned positive integer constant or an integer<br />

constant expression enclosed in parentheses whose value is 8 or 16.<br />

This form of the COMPLEX statement is a <strong>Open</strong> <strong>Watcom</strong> <strong>FORTRAN</strong> <strong>77</strong> extension to the <strong>FORTRAN</strong> <strong>77</strong><br />

language. The length specification specifies the number of bytes of storage that will be allocated for the<br />

name appearing in the COMPLEX statement. The default length specification is 8. A length specification of<br />

16 specifies that the data type of the name appearing in the COMPLEX statement is to be double precision<br />

complex.<br />

The length specification immediately following the word COMPLEX is the length specification for each<br />

entity in the statement not having its own length specification. If a length specification is not specified the<br />

default length specification is used. An entity with its own specification overrides the default length<br />

specification or the length specification immediately following the word COMPLEX. Note that for an array<br />

the length specification applies to each element of the array.<br />

Example:<br />

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

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

COMPLEX*16 X<br />

In the previous example, X is declared to be a variable of type double precision complex, A is declared to be<br />

a variable of type complex and B and C are declared to be arrays of type double precision complex.<br />

2.14.3 Extended COMPLEX Statement: Data Initialization<br />

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

where:<br />

name<br />

len<br />

cl<br />

is as described in the previous section.<br />

is as described in the previous section.<br />

is a list of the form:<br />

k [,k] ...<br />

k<br />

is one of the forms:<br />

c<br />

r*c (equivalent to r successive appearances of c)<br />

c<br />

is a constant or the symbolic name of a constant<br />

34 COMPLEX Statement

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

Saved successfully!

Ooh no, something went wrong!