; REHEX
;---------------------------------------------------------------
;! converts extended hex string to decimal
;# Verb POPS GENERAL
;-----------------------------------------------------------------------
;;  Copyright (C) 1995, 2004
;;  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
;-----------------------------------------------------------------------
REHEX     LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
REHEX:  Verb to convert extended hex strings to decimal numbers
EHNUMB   $                         Extended hexadecimal version
DENUMB   $        0.0    1679616.  Decimal number:
         $                            0 -> login user number
          The extended hex string may also given as an immediate
          argument.  Example:    REHEX '10'
----------------------------------------------------------------
REHEX
Type: Verb
Use:  REHEX will convert a string adverb or an immediate argument from
      an "extended-hexidecimal" (base 36) string to a decimal integer.
      Examples:
         >REHEX '1aj'
         AIPS 2: Decimal number 1675 is '1AJ' in extended hex
         >REHEX '0GH'
         AIPS 2: Decimal number  593 is '0GH' in extended hex
         >REHEX 'gh'
         AIPS 2: Decimal number  593 is 'GH' in extended hex
         >task = 'imagr'
         >REHEX TASK
         AIPS 2: Decimal number 31273083 is 'IMAGR' in extended hex
         >DENUMB = 0
         >REHEX
         AIPS 2: Decimal number   36 is '0010' in extended hex
         >REHEX SOURCES
         AIPS 2: Decimal number   36 is '0010' in extended hex
         AIPS 2: INTERP: STACKS NOT EMPTY WHEN LINE DONE
      Note that the login user number is converted if no argument is
      given AND there is no other string on the stack.  The input string
      must be <= 4 characters (each of SOURCES is 16 characters).
Input/output adverbs:
  EHNUMB......Hexadecimal number in 4 or fewer characters, left
              justified to be converted if there is no immediate
              string argument.  If there is an immediate argument
              EHNUMB is set to it on output.
  DENUMB......Decimal number equivalent to the extended hexadecimal
              string.  If the input string is blank, DENUMB's value is
              used as the immediate argument with the login user
              number as the default.
----------------------------------------------------------------
