*+
*  Name:
*     ARY_PCB

*  Purpose:
*     Define ARY_ system Placeholder Control Block.

*  Language:
*     Starlink Fortran 77

*  Type of Module:
*     Global variables include file.

*  Description:
*     This file defines global variables which hold information about
*     placeholders used by the ARY_ system. Entries in this block are
*     kept in one-to-one correspondence with placeholder identifiers
*     issued to users.

*  Prior Requirements:
*     The SAE_PAR, ARY_PAR and ARY_CONST include files should be
*     included prior to this file, in order to define constants used
*     here.

*  Authors:
*     RFWS: R.F. Warren-Smith (STARLINK)
*     {enter_new_authors_here}

*  History:
*     25-SEP-1989 (RFWS):
*        Original version.
*     20-OCT-1989 (RFWS):
*        Added PCB_TMP array to indicate whether placeholders are
*        intended for temporary objects.
*     {enter_further_changes_here}

*-

*  Global Variables:

*  Which slots have been used.
*  ==========================
*  This array is initialised to .FALSE. by the ARY1_INIT block data
*  routine. Its entries are then selectively set to .TRUE. to indicate
*  which slots in the PCB are in use (i.e. have identifiers issued for
*  them).
      LOGICAL PCB_USED( ARY__MXPCB )
      
*  Placeholder locator.
*  ===================
*  If a slot is in use, then the PCB_LOC entry holds an HDS locator to
*  an ARY_ placeholder object, which reserves a position in the data
*  system.
      CHARACTER * ( DAT__SZLOC ) PCB_LOC( ARY__MXPCB )

*  Temporary placeholder flag.
*  ==========================
*  If a slot is in use, then its PCB_TMP entry indicates whether the
*  object which replaces the placeholder object should be temporary.
      LOGICAL PCB_TMP( ARY__MXPCB )

*  Record of identifiers issued.
*  ============================
*  The value of PCB_PLCNT is initialised by the ARY1_INIT block data
*  routine and is incremented each time a placeholder identifier is
*  issued.  The next identifier value is generated using the new value
*  of PCB_PLCNT and this ensures that identifier values are not
*  re-used.  When an identifier is issued for a slot, its value is
*  stored in the PCB_CHK entry and an identifier is only considered
*  valid if it matches the PCB_CHK entry in the slot to which it
*  refers. This allows identifiers to be rendered invalid either by the
*  user (by assigning the ARY__NOPL value to them), or by the ARY_
*  system (by marking the slot as not used, or by re-using it with a
*  new identifier value).
      INTEGER PCB_CHK( ARY__MXPCB )
      INTEGER PCB_PLCNT

*  Non-character data.
      COMMON /ARY1_PCB1/ PCB_CHK, PCB_PLCNT, PCB_TMP, PCB_USED

*  Character data.
      COMMON /ARY1_PCB2/ PCB_LOC

*.
