home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / getopt.zip / setuparg.3r < prev   
Text File  |  1994-04-20  |  2KB  |  60 lines

  1. SetupArg(3)                                                       SetupArg(3)
  2. ─────────────────────────────────────────────────────────────────────────────
  3.  
  4. NAME
  5.     SetupArg - Parse and store command-line arguments
  6.  
  7. SYNTAX
  8.     parse arg arglist
  9.     call SetupArg arglist
  10.     .
  11.     .
  12.     .
  13.     SetupArg: procedure expose GetOpt.
  14.         parse arg arglist
  15.  
  16. DESCRIPTION
  17.     SetupArg parses the command-line arguments to a REXX program and stores 
  18.     them in the global stem variable GetOpt. in a format usable by the GetOpt 
  19.     subroutine. SetupArg stores the program name in GetOpt._program, the 
  20.     first argument after the program name in GetOpt.1, the second in 
  21.     GetOpt.2, and so on. The total number of arguments is stored in GetOpt.0. 
  22.  
  23.     This routine can handle quoted arguments.  That is, the string "This is 
  24.     one argument" will be considered one argument instead of four.
  25.  
  26. GLOBAL VARIABLES
  27.     SetupArg uses a stem variable named GetOpt., which contains the following 
  28.     stems:
  29.  
  30.     GetOpt.0
  31.             Specifies the number of parameters passed to the routine.
  32.  
  33.     GetOpt.1 through GetOpt.n
  34.             Specifies the list of parameters passed to the routine.
  35.  
  36.     GetOpt._optarg
  37.             Initialized for use by GetOpt.
  38.  
  39.     GetOpt._opterr
  40.             Initialized for use by GetOpt.
  41.  
  42.     GetOpt._optind
  43.             Initialized for use by GetOpt.
  44.  
  45.     GetOpt._optopt
  46.             Initialized for use by GetOpt.
  47.  
  48.     GetOpt._sp
  49.             Initialized for use by GetOpt.
  50.  
  51. NOTES
  52.     SetupArg does not handle quoted quotation marks (\"), and does not 
  53.     do wildcard expansion.
  54.  
  55. SEE ALSO
  56.     GetOpt(3)
  57.  
  58. COPYRIGHT
  59.     Copyright (c) 1994 Lawrence R Buchanan.
  60.