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

Table 9-17 provides examples of the integer edit descriptor on output.<br />

Table 9-17 I edit descriptor: output examples<br />

Descriptor Internal value Output<br />

I4 +452.25 b452<br />

I2 +6234 **<br />

I3 -11.92 -11<br />

I5 -52 bb-52<br />

I10 123456.5 bbbb123456<br />

I6.3 3 bbb003<br />

I3.0 0 bbb<br />

I3 0 bb0<br />

L(Logical)editdescriptor<br />

The L edit descriptor defines a field for logical data. Its syntax is:<br />

[r]L[w]<br />

where:<br />

r is a positive integer constant, specifying the repeat factor.<br />

w is a positive integer constant, specifying the field width.<br />

The I/O list item corresponding to an L edit descriptor must be of type logical, short logical, or<br />

byte.<br />

Input<br />

The field width is scanned for optional blanks followed by an optional decimal point, followed<br />

by T (or t) fortrueorF (or f) for false. The first nonblank character in the input field<br />

(excluding the optional decimal point) determines the value to be stored in the declared logical<br />

variable. It is an error if the first nonblank character is not T, t, F, f, or a period(.).<br />

222<br />

Chapter 9

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

Saved successfully!

Ooh no, something went wrong!