02.07.2013 Views

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Table 9-1 Edit descriptors (Continued)<br />

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

kP Control No Input/output Set scale factor to k.<br />

Q Control No Input Return number of bytes<br />

remaining to be read in<br />

current input record.<br />

S or SP Control No Output Print optional plus sign.<br />

The following sections describe the edit descriptors.<br />

I/O formatting<br />

Edit descriptors<br />

SS Control No Output Do not print optional plus sign.<br />

Tc Control No Input/output Move to column c.<br />

TLc Control No Input/output Move c columns to the left.<br />

TRc or cX Control No Input/output Move c columns to the right.<br />

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

hexadecimal base.<br />

NOTE There is no single edit descriptor that defines a field for complex data. Instead,<br />

youmustusetworealeditdescriptors—thefirstfortherealpartofthenumber,<br />

and the second for the imaginary part. The two edit descriptors may be<br />

different or the same, and you can insert control and character string edit<br />

descriptors between them.<br />

Likewise, there are no edit descriptors for formatting derived types and<br />

pointers. For derived types, you must specify the appropriate sequence of edit<br />

descriptors that match the data types of the derived type’s components. For<br />

pointers, you must specify the edit descriptor that matches the type of the<br />

target object.<br />

Character string (’...’ or ”...”) edit descriptor<br />

The character string edit descriptor is used to write a character constant to a formatted<br />

output record. It cannot be used to format input. You can use either apostrophes or quotation<br />

marks to delimit the constant. Whichever you use, they must be balanced. That is, if you begin<br />

with an apostrophe, you must also end with it. If the enclosed character constant includes a<br />

Chapter 9 207

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

Saved successfully!

Ooh no, something went wrong!