HP Fortran Programmer's Reference (September 2007)

HP Fortran statements
STRUCTURE (extension)
Chapter 10468
STRUCTURE /sixbytes/
INTEGER(KIND=2) :: twobytes
CHARACTER(LEN=4) :: %FILL
END STRUCTURE
%FILL can be of any type and may appear more than once in a structure.
%FILL should not be needed in normal usage. The compiler automatically adds padding to
ensure proper alignment.
Nested structures
A
field-def
can itself be a structure definition, known as a nested structure. The syntax of a
nested structure definition is:
STRUCTURE /
struct-name
/
struct-field-list
field-def
...
END STRUCTURE
struct-name
is the structure’s name (delimited by slashes), which can be used later to
declare a record.
struct-field-list
is a comma-separated list of one or more names of nested structure field
names.
field-def
can be one of the following regular field definitions (defined in the same way
as an unnested structure field):
A type declaration statement
Another nested structure
A nested record
A union definition
NOTE Note that a structure definition allows multiple levels of
nesting.
A nested structure definition is the same as an unnested structure definition, with two
exceptions:
•/
struct-name
/ is optional in a nested structure.
A nested structure definition must include a list of one or more structure field names
(
struct-field-list
).