  ------------------------------------------------------------------------
  CmdParse unit                             by Sebastian Groeneveld (2000)
  ------------------------------------------------------------------------

  Usage
  =====

  Add the following line to your program:

  $INCLUDE "CmdParse.inc"



  Global variables
  ================

  ------
    break_characters AS STRING

    Contains a list of characters that are treated as argument
    separators. The default is a space character (if string is
    empty).

  ------
    argc AS INTEGER

    Changed by ReadCommandline. Contains the number of arguments
    found on the specified command line. argv(0) does not count as a
    real argument, so if an empty string is specified, argc is 0.

  ------
    argv(0 TO 255) AS STRING

    Changed by ReadCommandline. Contains the arguments on the
    specified command line. argv(0) always contains the executable's
    path and name.




  Public routines
  ===============

  ------
    SUB ReadCommandline( BYVAL cmd_line AS STRING )

    This routine parses the specified command line and returns the
    information in the global variables 'argc' and 'argv()'.




  Examples
  ========

  In the following examples, COMMAND$ contains the string:
  "/First option/Second option/Third option"

  ---------------------
     break_characters = " "    'not really needed, since space is default
     CALL ReadCommandline( COMMAND$ )

  Results:
     argc = 4
     argv(1) = "/First"
     argv(2) = "option/Second"
     argv(3) = "option/Third"
     argv(4) = "option"

  ---------------------
     break_characters = "/ "   'both a slash and a space separate arguments
     CALL ReadCommandline( COMMAND$ )

  Results:
     argc = 6
     argv(1) = "/First"
     argv(2) = "option"
     argv(3) = "/Second"
     argv(4) = "option"
     argv(5) = "/Third"
     argv(6) = "option"

  ---------------------
     break_characters = "/"    'arguments must be preceeded by a slash
     CALL ReadCommandline( COMMAND$ )

  Results:
     argc = 3
     argv(1) = "/First option"
     argv(2) = "/Second option"
     argv(3) = "/Third option"
