NAME:
  numtoflist
 PURPOSE:   (one line only)
  Convert array of integer numbers to roboccd style filenames and back.
 DESCRIPTION:
 If the input list is numbers you get filenames out. If the input list is
 filenames you get numbers out.  It is also possible to input filenames and get
 a string out parseable by rangepar. 
 CATEGORY:
  Utility
 CALLING SEQUENCE:
  numtoflist, inlist,outlist
 INPUTS:
  inlist - list of integers or file name strings in 'roboccd' format.
              To get such a list you must strip off the rundate from a normal
              file name.  Thus, if the file name is 030506.010, you would
              provide '.010'.  if the file name as 030506a.010, you would
              provide 'a.010'.  The easiest way to do this is to put
              strmid(fn,6) on the input command line if fn is the list
              of file names (with no path).
 OPTIONAL INPUT PARAMETERS:
 KEYWORD INPUT PARAMETERS:
  DIRECT - flag, if set will force flist to numeric conversion- thus,
            an inlist of integers is an error.
  REVERSE - flag, if set will force  numeric to flist conversion- thus,
            an inlist of strings is an error.
  RANGEPAR- flag, if set numeric output is in the form of a rangepar string
            instead of an array of integers.
  ROBOCCD-  flag, indicating roboccd style naming, currently for documentary
            purposes only.
 OUTPUTS:
  outlist -list of file name strings in 'roboccd' format or integers. 
 KEYWORD OUTPUT PARAMETERS:
 ERROR-    set if one or more conversion errors occurred.
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 The 'roboccd' style of image naming allows frame numbers between 0 and
 26999  inclusive, where the file name is .000 through .999 for the
 first 1000, then a.000 thru a.999 up until z.999. This requires, in the
 roboccd tool set, that this style of file name be IMMEDIATELY preceded
 by the 6 digit date WITHOUT an intervening '.'. So 080125.999 is followed
 by 080125a.000. The 'filenames' in this example are '.999' and 'a.000' and
 are converted by NUMTOFLIST to [999, 1000].
 MODIFICATION HISTORY:
  Written by Peter L. Collins, Lowell Observatory, 2008/01/25