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 formatting<br />

Edit descriptors<br />

delimiting character, it must be of the other type; or you can escape the delimiter by giving<br />

another of the same type. The width of the field is the number of characters enclosed by the<br />

character string edit descriptors, including any blanks.<br />

Table 9-2 provides examples of the character string edit descriptor on output. Note that b<br />

represents a blank.<br />

Table 9-2 Character string edit descriptor output examples<br />

Descriptor Field width Output<br />

'Enter data:' 11 Enter data:<br />

”David's turn” 12 David's turn<br />

”bbbSpacesbbb” 12 bbbSpacesbbb<br />

'That''ll do.' 11 That'll do.<br />

”””That'll do!””” 13 ”That'll do!”<br />

”””” 1 ”<br />

'”' 1 ”<br />

Newline ($) edit descriptor<br />

The newline edit descriptor is an <strong>HP</strong> extension that suppresses the generation of the newline<br />

character (that is, the carriage-return/linefeed sequence) during formatted, sequential output.<br />

By default, the cursor moves to a newline after each output statement. The newline edit<br />

descriptor causes the cursor to remain on the same line, immediately to the right of the last<br />

character output.<br />

NOTE Nonadvancing I/O also suppresses the newline at the end of a record. Unlike<br />

thenewline($) edit descriptor, it is a standard feature of <strong>Fortran</strong> 90, and can be<br />

used on input and output. For more information, see “Nonadvancing I/O” on<br />

page 184 and the ADVANCE= I/O specifier in “OPEN” on page 376.<br />

208<br />

Chapter 9

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

Saved successfully!

Ooh no, something went wrong!