home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
getopt.zip
/
setuparg.3r
< prev
Wrap
Text File
|
1994-04-20
|
2KB
|
60 lines
SetupArg(3) SetupArg(3)
─────────────────────────────────────────────────────────────────────────────
NAME
SetupArg - Parse and store command-line arguments
SYNTAX
parse arg arglist
call SetupArg arglist
.
.
.
SetupArg: procedure expose GetOpt.
parse arg arglist
DESCRIPTION
SetupArg parses the command-line arguments to a REXX program and stores
them in the global stem variable GetOpt. in a format usable by the GetOpt
subroutine. SetupArg stores the program name in GetOpt._program, the
first argument after the program name in GetOpt.1, the second in
GetOpt.2, and so on. The total number of arguments is stored in GetOpt.0.
This routine can handle quoted arguments. That is, the string "This is
one argument" will be considered one argument instead of four.
GLOBAL VARIABLES
SetupArg uses a stem variable named GetOpt., which contains the following
stems:
GetOpt.0
Specifies the number of parameters passed to the routine.
GetOpt.1 through GetOpt.n
Specifies the list of parameters passed to the routine.
GetOpt._optarg
Initialized for use by GetOpt.
GetOpt._opterr
Initialized for use by GetOpt.
GetOpt._optind
Initialized for use by GetOpt.
GetOpt._optopt
Initialized for use by GetOpt.
GetOpt._sp
Initialized for use by GetOpt.
NOTES
SetupArg does not handle quoted quotation marks (\"), and does not
do wildcard expansion.
SEE ALSO
GetOpt(3)
COPYRIGHT
Copyright (c) 1994 Lawrence R Buchanan.