10.07.2015 Views

PGI Fortran Reference manual - The Portland Group

PGI Fortran Reference manual - The Portland Group

PGI Fortran Reference manual - The Portland Group

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Input and Output<strong>The</strong> basic form of this format specification is:nHc1cn...where n is the number of characters to print and c1 through cn are the characters to print.5.5.2.15. O Format Control Octal Values<strong>The</strong> O and Z field descriptors transfer octal or hexadecimal values and can be used with aninteger data type. <strong>The</strong>y have the form:Ow[.m] and Zw[.m]where w specifies the field width and m indicates minimum field width on output.On input, the external field to be input must contain (unsigned) octal or hexadecimal charactersonly. An all blank field is treated as a value of zero. If the value of the external field exceeds therange of the corresponding list element, an error occurs.On output, the O and Z field descriptors transfer the octal and hexadecimal values, respectively,of the corresponding I/O list element, right-justified, to an external field that is w characters long.‣ If the value to be transmitted does not fill the field, leading spaces are inserted.‣ If the value is too large for the field, the entire field is filled with asterisks.‣ If m is present, the external field consists of at least m digits, and is zero-filled on the left ifnecessary.‣ If m is zero, and the internal representation is zero, the external field is blank-filled.5.5.2.16. P Format Specifier – Scale Control<strong>The</strong> P format specifier is the scale factor format.kPThis specifier is applied as follows.‣ With F, E, D and G editing on input and F editing on output, the external number equals theinternal number multiplied by 10**k .‣ If there is an exponent in the field on input, editing with F, E, D and G the scale factor has noeffect.‣ On output with E and D editing, the basic real constant part of the number is multiplied by10**k and the exponent reduced by k.‣ On output with G editing, the effect of the scale factor is suspended unless the size of thedatum to be edited is outside the range permitted for F editing.‣ On output if E editing is required, the scale factor has the same effect as with E outputediting.<strong>The</strong> following example uses a scale factor.DIMENSION A(6)DO 10 I = 1,6 10A(I) = 25.TYPE 100,A 100FORMAT(' ',F8.2,2PF8.2,F8.2)<strong>PGI</strong> <strong>Fortran</strong> <strong>Reference</strong> Guide 80

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

Saved successfully!

Ooh no, something went wrong!