; EGETNAME
;---------------------------------------------------------------
;! fills in input name adverbs by catalog slot number, w error
;# Verb Catalog
;-----------------------------------------------------------------------
;;  Copyright (C) 1995, 2003
;;  Associated Universities, Inc. Washington DC, USA.
;;
;;  This program is free software; you can redistribute it and/or
;;  modify it under the terms of the GNU General Public License as
;;  published by the Free Software Foundation; either version 2 of
;;  the License, or (at your option) any later version.
;;
;;  This program is distributed in the hope that it will be useful,
;;  but WITHOUT ANY WARRANTY; without even the implied warranty of
;;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;  GNU General Public License for more details.
;;
;;  You should have received a copy of the GNU General Public
;;  License along with this program; if not, write to the Free
;;  Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
;;  MA 02139, USA.
;;
;;  Correspondence concerning AIPS should be addressed as follows:
;;         Internet email: aipsmail@nrao.edu.
;;         Postal address: AIPS Project Office
;;                         National Radio Astronomy Observatory
;;                         520 Edgemont Road
;;                         Charlottesville, VA 22903-2475 USA
;-----------------------------------------------------------------------
EGETNAME  LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
EGETNAME: Verb to fill in INNAME, INCLASS, INSEQ; return ERROR
         $The slot number is given as the immediate argument
                 Input adverb:
USERID    -32000.0    32000.0      User #. 0 => logon
                                      32000. => any
         $       Input/output adverb:
INDISK   $     0.0        9.0      Disk drive #.  0 => any
         @       Output adverbs:
INNAME   @                         1st input file (name)
INCLASS  @                         1st input file (class)
INSEQ    @      0.0       9999.0   1st input file (seq #)
INTYPE   @                         1st input file (type)
ERROR    @    -1.0        1.0      > 0 => slot empty, assigned
         @                         to someone else, too high
         $EGETNAME differs from GETNAME in that it returns ERROR
         $to POPS rather than quitting on common errors.
         $The slot number is given as the immediate argument
----------------------------------------------------------------
EGETNAME
Type: Verb
Use:  EGETNAME(n) will interpret its immediate argument as a
      catalog slot number and assign adverbs INNAME, INCLASS,
      and INSEQ to correspond to that slot.  If the input
      value of INDISK is zero, it will be changed to that
      corresponding to USERID's image, but only if such a
      change is required to avoid duplicate names (i.e. the
      same image name on different volumes).  EGETNAME allows
      the user to handle error conditions rather than having
      POPS simply abort the input line on error.  For example:
            PROC ZAPIT (X, Y)
            FOR I = X TO Y;
               EGETNAME (I)
               IF ^ ERROR THEN ZAP; END
               END
            FINISH
      ZAPs consecutive slots skipping empty ones.

      Example:
         EGETNAME(24) will fill INNAME, INCLASS, and INSEQ with the
         24'th catalog entry on disk INDISK.  If INDISK is zero, all
         disks are searched and, only if needed to avoid duplicate
         names, INDISK is set to the volume containing the USERID's
         image.
Input adverbs:  The immediate argument is a catalog slot number.
  INDISK......The disk the catalog is on.  0 => any
  USERID......The logon user number of the image's owner.
              0 => current logon #,  32000=> any user #
Output adverbs:
  ERROR.......(Output) False (-1) => name parameters set; True (1)
              => slot number too high, slot empty, or slot
              assigned to another user.
  INNAME......First image name (name)
  INCLASS.....First image name (class).
  INSEQ.......First image name (seq. #).
  INTYPE......First image name (type).
  INDISK......Disk drive # of first image (output only if needed
              to avoid duplication).
----------------------------------------------------------------
