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 />

2.53.3 IMPLICIT NONE Statement<br />

IMPLICIT NONE<br />

2.53.4 Description of IMPLICIT Statement<br />

The IMPLICIT statement defines the default type and length for all variables, arrays, symbolic constants,<br />

external functions and statement functions that begin with any letter that has appeared in an IMPLICIT<br />

statement as a single letter or as a member of a range of letters.<br />

The following example specifies that any name beginning with the letters A, D, E, F or G will have<br />

default a default type of integer and any name beginning with the letters X, Y or Z will have a default type<br />

of character and length 3.<br />

Example:<br />

IMPLICIT INTEGER (A,D-G), CHARACTER*3 (X-Z)<br />

The next example illustrates the extended form of the IMPLICIT statement.<br />

Example:<br />

IMPLICIT INTEGER*2 (A,B), LOGICAL*1 (C-F)<br />

IMPLICIT COMPLEX*16 (X,Y,Z), REAL*8 (P)<br />

Specifying NONE in the IMPLICIT statement will cause <strong>Open</strong> <strong>Watcom</strong> <strong>FORTRAN</strong> <strong>77</strong> to issue an error<br />

when a symbol is used and has not appeared in a type specification statement.<br />

Example:<br />

* Referencing X will cause an error<br />

IMPLICIT NONE<br />

X = 13143.383<br />

In the above example, the IMPLICIT statement specifies that the type of all symbols must be explicitly<br />

declared in a type specification statement. The assignment statement will cause an error since the type of X<br />

has not been explicitly declared.<br />

Notes:<br />

1. The implicit type set by an IMPLICIT statement may be overridden or confirmed for any<br />

variable, array, symbolic constant, external function or statement function name by its<br />

appearance in a type statement. The default length specification may also be overridden or<br />

confirmed in a type statement.<br />

90 IMPLICIT Statement

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

Saved successfully!

Ooh no, something went wrong!