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.

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

PRINT<br />

Formatted output<br />

The following statement writes the contents of the variables num and des to standard output,<br />

using the format specification in the FORMAT statement at label 10:<br />

PRINT 10, num, des<br />

List-directed output<br />

The following statement uses list-directed formatting to print the literal string x= and the<br />

value of the variable x:<br />

PRINT *, 'x=', x<br />

Embedded format specification<br />

The following statement uses an embedded format specification to print the same output:<br />

PRINT '(A2, F8.2)', 'x=', x<br />

Namelist-directed output<br />

The following statement prints all variables in the namelist group coord, using<br />

namelist-directed formatting:<br />

PRINT coord<br />

Related statements<br />

FORMAT and WRITE<br />

Related concepts<br />

For related information, see the following:<br />

398<br />

“List-directed I/O” on page 178<br />

“Embedded format specification” on page 230<br />

“Implied-DO loop” on page 191<br />

Chapter 10

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

Saved successfully!

Ooh no, something went wrong!