VMS Help
FORTRAN, Statements, Type declaration, Character

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

  Format:

     CHARACTER[*len[,] v[*len] [/clist/] [,v[*len] [/clist/]]...

     len    Is an unsigned integer constant, an integer constant
            expression enclosed in parentheses, or an asterisk (*)
            enclosed in parentheses.  The value of "len" specifies
            the length of the character data elements.

     v      Is the symbolic name of a constant, variable, array,
            statement function or function subprogram, or array
            declarator.  The name can optionally be followed by
            a data type length specifier (*len or *(*)).

     clist  Is a list of constants, as in a DATA statement.  If
            "v" is the symbolic name of a constant, "clist" must
            not be present.

  If you use CHARACTER*len, "len" is the default length specification
  for that list.  If an item in that list does not have a length
  specification, the item's length is "len".  However, if an item
  does have a length specification, it overrides the default length
  specified in CHARACTER*len.

  When an asterisk length specification *(*) is used for a function
  name or dummy argument, it assumes the length of the corresponding
  function reference or actual argument.  Similarly, when an asterisk
  length specification is used for the symbolic name of a constant,
  the name assumes the length of the actual constant it represents.
  For example, STRING assumes a 9-byte length in the following
  statements:

     CHARACTER*(*) STRING
     PARAMETER (STRING = 'VALUE IS:')

  The length specification must range from 1 to 2**31-1 on RISC
  processors.  If no length is specified, a length of 1 is assumed.

  Character type declaration statements can define arrays if they
  include array declarators in their list.  The array declarator goes
  first if both an array declarator and a length are specified.

  A character type declaration statement can assign initial values to
  variables or arrays if it specifies a list of constants (the
  clist).  The specified constants initialize only the variable or
  array that immediately precedes them.  The "clist" cannot have more
  than one element unless it initializes an array.  When the "clist"
  initializes an array, it must contain a value for every element in
  the array.
  Close     HLB-list     TLB-list     Help  

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