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.22 DOUBLE PRECISION Statement<br />

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

be of type double precision. The implicit type of the name, whether defined by the "first letter rule" (see<br />

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

either confirmed or overridden. However, once a name has been declared to be of type double precision, it<br />

cannot appear in another type declaration statement.<br />

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

2.22.1 Standard DOUBLE PRECISION Statement<br />

<br />

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

Example:<br />

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

DOUBLE PRECISION A, B(10), C<br />

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

be arrays of type double precision.<br />

2.22.2 Extended DOUBLE PRECISION Statement: Data Initialization<br />

DOUBLE PRECISION name [/cl/] [,name[/cl/]] ...<br />

where:<br />

name<br />

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

DOUBLE PRECISION Statement 51

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

Saved successfully!

Ooh no, something went wrong!