Modula-2 Reloaded ⋄ Program Args

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

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.