HP Fortran Programmer's Reference (September 2007)

HP Fortran statements
ENCODE (extension)
Chapter 10338
ENCODE (extension)
Outputs formatted data to internal storage.
Syntax
ENCODE (
count
,
format
,
unit
,
io-specifier-list
) [
out-list
]
count
is an integer expression that specifies the number of characters (bytes) to
translate from character format to internal (binary) format.
count
must
precede
format
.
format
specifies the format specification for formatting the data.
format
can be one
of the following:
The label of a FORMAT statement containing the format specification.
An integer variable that has been assigned the label of a FORMAT
statement.
An embedded format specification. For information about embedded
format specifications, see “Embedded format specification” on page 264.
format
must be the second of the parenthesized items, immediately
following
count
. Note that the keyword FMT= is not used.
unit
is the internal storage designator. It must be a scalar variable or array
name. Assumed-size and adjustable-size arrays are not permitted. Note that
char-var-name
is not a unit number and that the keyword UNIT= is not
used.
unit
must be the third of the parenthesized items, immediately following
format
.
io-specifier-list
is a comma-separated list of I/O specifiers. Note that the unit and format
specifiers are required; the other I/O specifiers are optional. The following
I/O specifiers can appear in
io-specifier-list
:
ERR=
stmt-label