home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume29 / parseargs / part01 / doc / argvalopt.inc next >
Encoding:
Text File  |  1992-05-19  |  1.2 KB  |  20 lines

  1. .\"----------------------------------------------------------------------------
  2. .\"-- This text was extracted using the following command:
  3. .\"--   xdoc -man -p '[ \t]*' -s ARGVALOPT ../parseargs.c
  4. .\"----------------------------------------------------------------------------
  5. .SH OPTIONS WITH OPTIONAL ARGUMENTS
  6. .PP
  7. Options that may take an optional argument need special consideration.
  8. The shell programmer needs to know whether or not the option was given, and
  9. (if given) if it was accompanied by an argument. In order to accommodate this
  10. need, \fBparseargs\fP will set an additional shell variable for each argument
  11. that is given the \s-1ARGVALOPT\s+1 flag if it is supplied on the command line
  12. \fIregardless of whether or not it was accompanied by its optional argument\fP.
  13. If the user has defined an option which may optionally
  14. take an argument and the option appears on the command line
  15. \fIwith or without\fP its associated argument, then the shell variable
  16. \fI<name>\fP\f4_flag\fP will be assigned the value ``\f4TRUE\fP''
  17. (or the value supplied with the \fB\-T\fP option to \fBparseargs\fP) where
  18. \fI<name>\fP is the name of the shell variable associated with the option
  19. in the argument description string.
  20.