02.07.2013 Views

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

HP Fortran Programmer's 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.

I/O and file handling<br />

File access methods<br />

b&NLbIVAR = 4 3 2 1bCVAR ='', 'QRS', '',<br />

'', 'XXX', 'ABX'bLVAR = TbRVAR =<br />

5.75000E+25b/<br />

The following sections describe the format of namelist-directed input and output. See<br />

“NAMELIST” on page 369 for detailed information about the NAMELIST statement.<br />

Input A namelist-directed input record takes the following form:<br />

1. An ampersand character (&) immediately followed by a namelist group name. The group<br />

name must have been previously defined by a NAMELIST statement.<br />

182<br />

As an extension, the dollar sign ($) can be substituted for the ampersand.<br />

2. A sequence of name-value pairs and value separators. A name-value pair consists of the<br />

name of a variable in the namelist group, the equals sign (=), and a value having the same<br />

format as for list-directed input (z, c, r*c, andr*). A name-value pair can appear in any<br />

order in the sequence or can be omitted.<br />

A value separator may be one of the following:<br />

Blanks<br />

Tabs<br />

Newlines<br />

Any of the above with a single comma<br />

3. A terminating slash (/). As an extension, ($END) can be substituted for the slash.<br />

Names of character type may be qualified by substring range expressions and array names by<br />

subscript/array section expressions. If the name in a name-value pair is that of an array, the<br />

number of the values following the equals sign must be separated by value separators and<br />

must not exceed the number of elements in the array. If there are fewer values than elements,<br />

null values are supplied for the unfilled elements.<br />

Namelist-directed input values are formatted according to the same rules as for list-directed<br />

input data; see Table 8-2.<br />

Output The output record for namelist-directed I/O has the same form as the input record,<br />

but with these exceptions:<br />

The namelist group name is always in uppercase.<br />

Logical values are either T or F.<br />

Chapter 8

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

Saved successfully!

Ooh no, something went wrong!