NAME:
  strb36
 PURPOSE:
  Convert an integer into a Base 36 formatted string.
 DESCRIPTION:

 CATEGORY:
  Utility
 CALLING SEQUENCE:
  str=strb36(val)
 INPUTS:
  val - input is either scalar or vector
     if Integer (byte, int, long) convert to a string
          or
     if String convert to long.  Leading and trailing blanks are
          ignored but once trimmed all characters must be letters or numbers.
 OPTIONAL INPUT PARAMETERS:

 KEYWORD INPUT PARAMETERS:
  PAD - Length to pad the output string to.  Leading zeros will be prepended
          to the string to make the string of length PAD.  If the string is
          already longer than PAD nothing is done.  The default is zero (ie.,
          no padding).  This keyword has no effect if the input is a string.

 OUTPUTS:
  return is the string
 KEYWORD OUTPUT PARAMETERS:

 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 MODIFICATION HISTORY:
  1998/03/16, Written by Marc W. Buie, Lowell Observatory
  2000/02/16, MWB, added inverse function operation.
  2010/01/14, MWB, added support for vector input.