/sys$common/syshlp/helplib.hlb
FORTRAN, Format Specifiers, General Form

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

  The general form of a FORMAT statement is as follows:

     FORMAT (q1 f1s1 f2s2 ... fnsn qn)

     qn   Is zero or more slash (/) record terminators.
     fn   Is a field descriptor, an edit descriptor, or
          a group of field and edit descriptors enclosed
          in parentheses.
     sn   Is a field separator (a comma or slash).  A
          comma can be omitted in the following cases:

          o Between a P edit descriptor and an immediately
            following F, E, D, or G edit descriptor.

          o Before or after a slash (/) record terminator.

          o Before or after a colon (_:) edit descriptor.

  The "field descriptor" has one of the following forms:

     [r]c  [r]cw  [r]cw.m  [r]cw.d[Ee]

     r    Is the optional repeat count.  (If you omit "r",
          the repeat count is assumed to be 1.)
     c    Is a format code (I,O,Z,F,E,D,G,L, or A).
     w    Is the external field width in characters.  Each
          data item in the external medium is called an
          external field.
     m    Is the minimum number of characters that must appear
          in the field (including leading zeros).
     d    Is the number of characters to the right of the decimal point.
     E    Is an exponent field.
     e    Is the number of characters in the exponent.

  A group of field descriptors can be formed by enclosing a format
  specifier in parentheses and optionally preceding the group with a
  repeat count (defaults to 1).  Separate a group from other format
  specifiers or groups with field separators or record terminators.
  Groups can be nested to a depth of 8.

  The entire format specifier must be enclosed in parentheses.

  The ranges for "r", "w", "m", "d", and "e" are as follows:

  Term      Range
  ----      __________
   r        1 to 32767 (2**15-1)
   w        1 to 32767
   m        0 to 255 (2**8-1)
   d        0 to 255
   e        1 to 255

  The "d" and "e" terms are required in some field descriptors and
  are invalid in others.

  The terms must all be unsigned integer constants or variable format
  expressions.

  You cannot use PARAMETER constants for "r", "w", "m", "d", or "e".

  The "edit descriptor" has one of the following forms:

     c  [n]c  c[n]

     c     Is a format code (X,T,TL,TR,SP,SS,S,BN,BZ,P,H,Q,'...'
           $, or :).
     n     Is the optional number of characters or character
           positions.

  The term "n" must be an unsigned integer constant (for format code
  P, it can be signed or unsigned) or a variable format expression.

  The value of "n" for P must be within the range -128 to 127.

  For all other format codes, the value of "n" must be within the
  range 1 through 32767 (2**15-1); above 32767, you receive an error.
  Actual useful ranges can be constrained by record sizes (RECL) and
  the file system.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.