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.

PRINT<br />

Writes to standard output.<br />

Syntax<br />

The syntax of the PRINT statement can take one of two forms:<br />

Formatted and list-directed syntax:<br />

PRINT format [, output-list ]<br />

Namelist-directed syntax:<br />

PRINT name<br />

format is one of the following:<br />

An asterisk (*), specifying list-directed I/O.<br />

<strong>HP</strong> <strong>Fortran</strong> statements<br />

PRINT<br />

The label of a FORMAT statement containing the format specification.<br />

An integer variable that has been assigned the label of a FORMAT<br />

statement.<br />

An embedded format specification.<br />

name is the name of a namelist group, as previously defined by a NAMELIST<br />

statement . Using the namelist-directed syntax, the PRINT statement sends<br />

data in the namelist group to standard output. To direct output to a<br />

connected file, you must use the WRITE statement and include the NML=<br />

specifier.<br />

output-list is a comma-separated list of data items for output. The data items can<br />

include expressions and implied-DO lists.<br />

Description<br />

The PRINT statement transfers data from memory to standard output. (Unit 6 is preconnected<br />

to the <strong>HP</strong>-UX standard output.) The PRINT statement can be used to perform formatted,<br />

list-directed, and namelist-directed I/O only.<br />

To direct output to a connected file, use the WRITE statement.<br />

Examples<br />

The examples in this section illustrate different uses of the PRINT statement.<br />

Chapter 10 397

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

Saved successfully!

Ooh no, something went wrong!