HP Fortran Programmer's Reference (September 2007)

I/O and file handling
File access methods
Chapter 8214
b
&NL
b
IVAR = 4 3 2 1
b
CVAR ='', 'QRS', '',
'', 'XXX', 'ABX'
b
LVAR = T
b
RVAR =
5.75000E+25
b
/
The following sections describe the format of namelist-directed input and output. See
“NAMELIST” on page 403 for detailed information about the NAMELIST statement.
Input A namelist-directed input record takes the following form:
1. An ampersand character (&) immediately followed by a namelist group name. The group
name must have been previously defined by a NAMELIST statement.
As an extension, the dollar sign ($) can be substituted for the ampersand.
2. A sequence of name-value pairs and value separators. A name-value pair consists of the
name of a variable in the namelist group, the equals sign (=), and a value having the same
format as for list-directed input (
z
,
c
,
r*c
, and
r*
). A name-value pair can appear in any
order in the sequence or can be omitted.
A value separator may be one of the following:
Blanks
Tabs
Newlines
Any of the above with a single comma
3. A terminating slash (/). As an extension, ($END) can be substituted for the slash.
Names of character type may be qualified by substring range expressions and array names by
subscript/array section expressions. If the name in a name-value pair is that of an array, the
number of the values following the equals sign must be separated by value separators and
must not exceed the number of elements in the array. If there are fewer values than elements,
null values are supplied for the unfilled elements.
Namelist-directed input values are formatted according to the same rules as for list-directed
input data; see Table 8-2.
Output The output record for namelist-directed I/O has the same form as the input record,
but with these exceptions:
The namelist group name is always in uppercase.
Logical values are either T or F.