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.

The magnitude is less than 0.1 but not zero.<br />

The magnitude is greater than or equal to 10**d (after rounding to d digits).<br />

I/O formatting<br />

Edit descriptors<br />

If the magnitude does not fit either of these rules, the F edit descriptor is used. When F is<br />

used, the field width is reduced by either 4 when Gw.d is specified, or by e+2 when Gw.dEe is<br />

specified. It is then followed by a number of trailing spaces equal to the number that the field<br />

width was reduced by. Finally, d is modified internally according to the new field width.<br />

For fixed- or floating-point format descriptors, the field width is w. The value is rounded to d<br />

digits, and the exponent consists of e digits. If Ee is omitted, the exponent occupies two<br />

positions. If Ee is omitted and the exponent is greater than 99 (that is, it requires three<br />

digits), the exponent letter is dropped from the output. The field width, w, should follow the<br />

general rule: w isgreaterthanorequaltothesumofd+7; or, if Ee is specified, w is greater<br />

than or equal to the sum of d+e+5. This rule provides positions for a leading blank, the sign of<br />

the value, d digits, the decimal point, and, if needed, the exponent letter (D, E, orQ), the sign of<br />

the exponent, and the exponent. Note that the Ee, De, andQe specifications control which<br />

exponent letter is output.<br />

Table9-14providesexamplesoftheGeditdescriptor on output.<br />

Table 9-14 G edit descriptor: output examples<br />

Descriptor Internal value Interpretation Output<br />

G10.3 +1234.0 E10.3 b0.123E+04<br />

G10.3 -1234.0 E10.3 -0.123E+04<br />

G12.4 +12345.0 E12.4 bb0.1235E+05<br />

G12.4 +9999.0 F8.0, 4X bbb9999.bbbb<br />

G12.4 -999.0 F8.1, 4X bb-999.0bbbb<br />

G7.1 +.09 E7.1 0.9E-01<br />

G5.1 -.09 E5.1 *****<br />

G11.1 +9999.0 E11.1 bbbb0.1E+05<br />

G8.2 +9999.0 E8.2 0.10E+05<br />

G7.2 -999.0 E7.2 *******<br />

G8.2 .true L8 bbbbbbbT<br />

G7.2 -999.0 E7.2 bbbb1234<br />

Chapter 9 219

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

Saved successfully!

Ooh no, something went wrong!