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.

Edit descriptors<br />

I/O formatting<br />

Edit descriptors<br />

Edit descriptors are encoded characters that describe data conversion between an internal<br />

(binary) format and an external (character) format. There are three types of edit descriptors:<br />

Data edit descriptors define the format of data to be read or written, such as its type and<br />

width (in characters). All data edit descriptors are repeatable; that is, they can be<br />

preceded by a positive integer that specifies the number of times the edit descriptor is to<br />

be replicated.<br />

Control edit descriptors specify editing information, such as the number of spaces<br />

between input items, treatment of blanks in input, and scale factors. Of the control edit<br />

descriptors, only the slash (/) is repeatable.<br />

Character string edit descriptors output text. None of these is repeatable.<br />

All of the edit descriptors supported by <strong>HP</strong> <strong>Fortran</strong> are listed in<br />

Table 9-1. As indicated by the syntax descriptions included in the table, the field width<br />

specification (w) is optional for all data edit descriptors in <strong>HP</strong> <strong>Fortran</strong>. Note that the <strong>Fortran</strong><br />

90 Standard defines the field width specifier to be optional only for the A edit descriptor. The<br />

table also identifies which edit descriptors are repeatable and which can be used on input,<br />

output, or both.<br />

Table 9-1 Edit descriptors<br />

Descriptor Type Repeatable? I/O use Function<br />

”...” or '...' Character<br />

string<br />

No Output Output enclosed string.<br />

$ Control No Output Suppress newline at end of<br />

output.<br />

/ (slash) Control Yes Input/output End current record and begin<br />

new record.<br />

: (colon) Control No Input/output Stop formatting if I/O list is<br />

exhausted.<br />

A[w] orR[w] Data Yes Input/output Convert character data.<br />

B[w[.m]] Data Yes Input/output Convert integer data, using<br />

binary base.<br />

Chapter 9 205

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

Saved successfully!

Ooh no, something went wrong!