PROGRAMA.DEF 1.1 KB

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