home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / modu1096.zip / ISOsym / programargs.def < prev    next >
Text File  |  1996-08-29  |  980b  |  34 lines

  1. DEFINITION MODULE ProgramArgs;
  2.  
  3.     (* Access to program arguments *)
  4.  
  5. IMPORT IOChan;
  6.  
  7.  
  8. TYPE
  9.   ChanId = IOChan.ChanId;
  10.  
  11. (* Initially, and after a reset operation on the channel, if there are
  12.    no program arguments a call of IsArg returns FALSE, otherwise
  13.    input is taken from the first argument to the program, as defined for
  14.    the implementation.
  15.  *)
  16.  
  17. PROCEDURE ArgChan () : ChanId;
  18. (* The returned value identifies a channel for reading program arguments *)
  19.  
  20. PROCEDURE IsArgPresent () : BOOLEAN;
  21. (* Tests if there is a current argument to read from.
  22.    If not, read < IOChan.CurrentFlags() will be FALSE and attempting to read from
  23.    the argument channel will cause the exception notAvailable to be raised.
  24.  *)
  25.  
  26. PROCEDURE NextArg;
  27. (* If there is another argument, causes subsequent input from the
  28.    argument device to come from the start of the next argument.
  29.    Otherwise there is no argument to read from - a call of IsArgPresent will
  30.    return FALSE
  31.  *)
  32.  
  33. END ProgramArgs.
  34.