Modula-2 Reloaded

A Modern Typesafe & Literate Programming Notation

Site Menu

Project

Specification

Implementation

Recommendations

Reference

Needs Updating

Work in Progress

Wastebasket

Wiki Manual

edit SideBar

Program Args

Spec.ProgramArgs History

Hide minor edits - Show changes to output

2010-01-09 15:41 by benjk - imported from Rick's email of Jan 8, 2010
Added lines 1-16:
[@DEFINITION MODULE ProgramArgs;
  (* Access to program arguments *)
 
IMPORT File;
 
PROCEDURE ArgFile (): File;
  (* Returns a value that identifies the file for reading program arguments *)
 
PROCEDURE IsArgPresent (): BOOLEAN;
  (* Tests if there is a current argument to read from. *)
 
PROCEDURE NextArg ();
  (* If there is another argument, causes subsequent input from the argument device
      to come from the start of the next argument. *)

END ProgramArgs.@]