HP 3000 Manuals

REAL Statement (Nonexecutable) [ HP FORTRAN 77/iX Reference ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Reference

REAL Statement (Nonexecutable) 

The REAL type specification statement explicitly assigns the REAL*4,
REAL*8, and REAL*16 data types to symbolic names, and optionally assigns
initial values to variables.

The following syntax includes the REAL, REAL*4, REAL*8, REAL*16, and
DOUBLE PRECISION statements.

[]
Semantics The REAL and REAL*4 statements are equivalent. The DOUBLE PRECISION and REAL*8 statements are equivalent. The REAL*16 statement has no equivalent. The REAL*4, REAL*8, and REAL*16 statements are extensions to the ANSI 77 standard. As an extension to the ANSI 77 standard, a length specifier can follow the item being declared. This specifier overrides the data length implied by the type statement. If the item is an array name with a dimension declarator, the length specifier precedes the dimension declarator. If an array declarator is specified in a type statement, the declarator for that array must not appear in any other specification statement (such as DIMENSION). If only the array name is specified, then an array declarator must appear within a DIMENSION or COMMON statement. Each symbolic name can appear in a type statement only once. As an extension to the ANSI 77 standard, you can initialize variables or arrays in a type declaration statement by enclosing the initialization values between slashes. The second example below illustrates this method of initialization. See "DATA Statement (Nonexecutable)" for further information on initialization. Examples Notes --------------------------------------------------------------------------------------- REAL item item is a three-dimensional array DIMENSION item(2,3,5) containing 30 4-byte real elements. DOUBLE PRECISION measure is an 8-byte real variable, +measure/384E-04/,test/2.1/ initialized to .0384. test is an 8-byte real variable, initialized to 2.1. REAL*16 accurate(5) accurate is an array containing 5 16-byte real elements.


MPE/iX 5.0 Documentation