VMS Help  —  FORTRAN  Format Specifiers, G
  Gw.d[Ee] (General Floating Editing)

  On input, G performs the same as F format.

  On output, G transfers the value of the corresponding I/O list
  element, rounded to "d" decimal positions, and right-justified, to
  an external field that is "w" characters long.  The form in which
  the value is written is a function of the magnitude of the value,
  as given below:

    Data Magnitude                                    Equivalent Conversion
    --------------                                    --------------------
    0 < m < 0.1 - 0.5x10**-d-1                        Ew.d[Ee]
    m = 0                                             F(w-n).(d-1),n('b')
    0.1 - 0.5x10**-d-1 <= m < 1 - 0.5x10**-d          F(w-n).d, n('b')
    1 - 0.5x10**-d <= m < 10 - 0.5x10**-d+1           F(w-n).(d-1), n('b')
    10 - 0.5x10**-d+1 <= n < 100 - 0.5x10**-d+2       F(w-n).(d-2), n('b')
          .                                               .
          .                                               .
          .                                               .
    10**d-2 - 0.5x10**-2 <= m < 10**d-1 - 0.5x10**-1  F(w-n).1, n('b')
    10**d-1 - 0.5x10**-1 <= m < 10**d - 0.5           F(w-n).0, n('b')
    m >= 10**d - 0.5                                  Ew.d[Ee]

  The 'b' is a blank following the numeric data representation.  For
  Gw.d, n('b') is 4 blanks.  For Gw.dEe, n('b') is "e"+2 blanks.

  The term "w" must be greater than or equal to d+7 to allow for the
  following:  a sign (optional if the value is positive and
  descriptor SP is not in effect), one digit to the left of the
  decimal point, a decimal point, "d" digits to the right of the
  decimal point, and either a 4-digit or an "e"+2-digit exponent.

  If "e" is specified, "w" must be greater than or equal to
  "d"+"e"+5.
Close Help