VMS Help
PASCAL, Data Types, String Types

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

  You can use schema and data types to  store  and  to  manipulate
  character  strings.   These  types  have  the following order of
  complexity:

  1.  CHAR type

  2.  PACKED ARRAY OF CHAR user-defined types

  3.  VARYING OF CHAR user-defined types

  4.  STRING predefined schema

  Objects of the CHAR data  type  are  character  strings  with  a
  length  of  1  and  are  lowest in the order of character string
  complexity.  You can assign CHAR data to variables of the  other
  string types.

  The PACKED ARRAY OF CHAR types allow you to specify fixed-length
  character  strings.   The  VARYING  OF  CHAR  types are a Compaq
  Pascal extension  that  allows  you  to  specify  varying-length
  character  strings  with  a constant maximum length.  The STRING
  types provide a standard way for  you  to  specify  storage  for
  varying-length  character strings with a maximum length that can
  be specified at run time.

  To provide values for variables of these types, you should use a
  character-string  constant (or an expression that evaluates to a
  character string) instead of an array constructor.  Using  array
  constructors  with STRING and VARYING OF CHAR types generates an
  error; to use array  constructors  with  PACKED  ARRAY  OF  CHAR
  types,  you  must  specify component values for every element in
  the array (otherwise, you generate an error).

  Example:

     VAR
        String1 : VARYING[10] OF CHAR VALUE 'abc';

  Additional Information (explode) :

  Close     HLB-list     TLB-list     Help  

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