24.11.2014 Views

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language 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.

Format<br />

11.7.1 Apostrophe Editing<br />

The apostrophe edit descriptor has the same form as a character constant and can only be used on output.<br />

It causes the characters in the format specification enclosed in quotes to be written. The field width is the<br />

number of characters enclosed in quotes.<br />

Example:<br />

PRINT ’(’’HI THERE’’)’<br />

END<br />

In the previous example, the string<br />

HI THERE<br />

would be the output produced by the PRINT statement.<br />

11.7.2 H Editing<br />

The nH edit descriptor causes the n characters following the H, including blanks, to be written. Like the<br />

apostrophe edit descriptor, it can only appear in a format specification used for output.<br />

Example:<br />

PRINT ’(8HHI THERE)’<br />

END<br />

In the previous example, the string<br />

HI THERE<br />

would be the output produced by the PRINT statement.<br />

11.7.3 Positional Editing: T, TL, TR and X Editing<br />

The T, TL, TR and X edit descriptors specify at which position the next character will be read from or<br />

written to the record. In the case of input, this allows data to be read more than once with different edit<br />

descriptors. On output, it is possible to overwrite data previously written.<br />

On output it is possible to use positional editing to create a record in which gaps appear. That is, there may<br />

be parts of the record where no data has been written. The parts of a record in which no data has been<br />

written are filled with blanks. The effect is as if the record was previously initialized to blanks. Note that<br />

positioning does not cause any data to be transmitted.<br />

The Tc edit descriptor specifies that the next character to be transmitted is to be from the cth character<br />

position in the record. The TLc edit descriptor specifies that the next character to be transmitted is to be<br />

from the cth position backward from the current position. The TRc edit descriptor is identical to the TLc<br />

edit descriptor except that positioning is forward from the current position. The nX edit descriptor behaves<br />

identically to the TRc edit descriptor; the transmission of the next character is n character positions forward<br />

from the current position. If n is omitted then the transmission of the next character is 1 character position<br />

forward from the current position.<br />

Editing 229

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

Saved successfully!

Ooh no, something went wrong!