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.

<strong>Language</strong> <strong>Reference</strong><br />

n<br />

Example:<br />

is 4 for Gw.d editing and e+2 for Gw.dEe editing.<br />

PRINT ’(1H,1H)’, .5, .5<br />

END<br />

The output from the PRINT statement in the previous example is the string:<br />

11.7.10.6 Complex Editing<br />

<br />

Since a complex datum consists of a pair of real or double precision data, the editing of a complex datum is<br />

specified by two successive pairs of F, E, D or G edit descriptors. The two descriptors may be different<br />

and may be separated by any number of non-repeatable edit descriptors. Double precision complex editing<br />

is identical to complex editing.<br />

11.7.11 L Edit Descriptor<br />

The Lw edit descriptor is used for I/O list items of type logical. The field width is w.<br />

On input the I/O list item will become defined with a datum of type logical. The input field consists of<br />

optional blanks, followed by an optional decimal point followed by a T or F for true or false respectively.<br />

The T and F may be followed by additional characters in the field. <strong>Open</strong> <strong>Watcom</strong> <strong>FORTRAN</strong> <strong>77</strong> allows t<br />

and f in addition to T and F on input.<br />

On output, the I/O list item must be defined with a datum of type logical. The output field consists of w-1<br />

blanks followed by a T for true or F for false.<br />

Example:<br />

PRINT ’(1H)’,.TRUE.,.FALSE.<br />

The output produced by the PRINT statement in the previous example is the string:<br />

< T F><br />

11.7.12 A Edit Descriptor<br />

The A[w] edit descriptor is used for I/O list items of type character. On input, the I/O list item becomes<br />

defined with character data. On output, the I/O list item must be defined with character data. If w is<br />

specified in the edit descriptor, the field width is w otherwise the field width is the number of characters in<br />

the I/O list item.<br />

<strong>Open</strong> <strong>Watcom</strong> <strong>FORTRAN</strong> <strong>77</strong> also permits I/O list items of non-character data types. On input, the I/O list<br />

item becomes defined with the binary representation of the character data. On output, the I/O list item is<br />

assumed to be defined with character data.<br />

If len is the length of the I/O list item and w is specified in A input editing so that w is greater than len,<br />

the rightmost len characters of the input field will be taken. If w is less than len, then the w characters in<br />

the input field will be taken and padded with len-w blanks.<br />

236 Editing

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

Saved successfully!

Ooh no, something went wrong!