VMS Help
PASCAL, Attributes, Allocation

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

  Allocation attributes indicate the  form  of  storage  that  the
  object should occupy.

  1 - AUTOMATIC

  The AUTOMATIC attribute specifies that storage for the  variable
  be  allocated  each time the program enters the routine in which
  the variable is declared.  The storage is deallocated each  time
  the  program  exits  from  that  routine.  An automatic variable
  exists as long as the declaring routine remains active.

  See the  "Compaq  Pascal  Language  Reference  Manual"  for  the
  complete description of using the AUTOMATIC attribute.

  2 - AT

  The AT attribute  specifies  that  Compaq  Pascal  allocates  no
  storage  for the object (storage has already been allocated) and
  that it resides at the exact, specfied address.

  Syntax:

     AT( n )

  The exact address is specified by  the  constant  expression  n.
  Variables representing machine-dependent entities are frequently
  given the AT attribute.

  See the  "Compaq  Pascal  Language  Reference  Manual"  for  the
  complete description of using the AT attribute.

  3 - COMMON

  The COMMON attribute specifies that storage for  a  variable  be
  allocated in an overlaid program section called a common block.

  Syntax:

     COMMON [[(identifier)]]

  The 'identifier' indicates the name of the common block.  It  is
  passed  in  uppercase  on  OpenVMS  systems.   If  you  omit the
  identifier, the name of the variable is used as the name of  the
  common block.

  This attribute allows you to share variables with  other  Compaq
  languages, such as FORTRAN.

  See the  "Compaq  Pascal  Language  Reference  Manual"  for  the
  complete description of using the COMMON attribute.

  4 - PSECT

  The PSECT attribute is useful for placing static  variables  and
  executable  blocks in program sections that will be shared among
  executable images.

  Syntax:

     [PSECT(identifier)]

  The 'identifier' designates the program section in which storage
  for  a variable, routine, or compilation is to be allocated.  It
  is passed in uppercase on OpenVMS  systems.   If  you  omit  the
  identifier,  the name of the variable is used as the name of the
  common block.  The identifier designates the compilation unit in
  which storage for a variable is to be allocated.

  5 - STATIC

  The STATIC attribute causes Compaq Pascal  to  create  a  static
  object, which is allocated only once and which exists as long as
  the executable image in which it is allocated remains active.

  See the  "Compaq  Pascal  Language  Reference  Manual"  for  the
  complete description of using the STATIC attribute.
  Close     HLB-list     TLB-list     Help  

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