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>FORTRAN</strong> Statements<br />

2.56 INTEGER Statement<br />

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

integer. 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 integer, it cannot appear in another type<br />

declaration statement.<br />

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

2.56.1 Standard INTEGER Statement<br />

<br />

INTEGER 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 INTEGER statement.<br />

Example:<br />

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

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

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

type integer.<br />

2.56.2 Extended INTEGER Statement: Length Specification<br />

INTEGER[*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 />

INTEGER Statement 99

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

Saved successfully!

Ooh no, something went wrong!