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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Input and Output‣ 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.11. L Format Control – Logical Data<strong>The</strong> L format control transfers logical data of field width w:LwOn input, the list item will become defined with a logical value; the field consists of optionalblanks, followed by an optional decimal point followed by T or F. <strong>The</strong> values .TRUE.or .FALSE. may also appear in the input field<strong>The</strong> output field consists of w-1 blanks followed by T or F as appropriate.5.5.2.12. Quote Format ControlQuote editing prints a character constant. <strong>The</strong> format specifier writes the characters enclosedbetween the quotes and cannot be used on input. <strong>The</strong> field width is that of the characterscontained within quotes (you can also use apostrophes to enclose the character constant).To write an apostrophe (or quote), use two consecutive apostrophes (or quotes).For example:WRITE ( *, 101)101 FORMAT ( 'Print an apostrophe '' and end.')Produces:Print an apostrophe ' and end.Similarly, you can use quotes, for example:WRITE ( *, 102)102 FORMAT ( "Print a line with a "" and end.")Produces:Print a line with a " and end.5.5.2.13. BN Format Control – Blank Control<strong>The</strong> BN and BZ formats control blank spacing. BN causes all embedded blanks except leadingblanks in numeric input to be ignored, which has the effect of right-justifying the remainder of thefield. Note that a field of all blanks has the value zero. Only input statements and I, F, E, D and Gediting are affected.BZ causes all blanks except leading blanks in numeric input to be replaced by zeros. Only inputstatements and I, F, E, D and G editing are affected.5.5.2.14. H Format Control – Hollerith Control<strong>The</strong> H format control writes the n characters following the H in the format specification andcannot be used on input.<strong>PGI</strong> <strong>Fortran</strong> <strong>Reference</strong> Guide 79

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

Saved successfully!

Ooh no, something went wrong!