The Params interface allows you to access command-line parameters. Params.Count is the number of parameters. Params.Get(0) returns the first parameter (the program name); Params.Get(Params.Count-1) returns the last parameter.
INTERFACE Params; VAR (*CONST*) Count: CARDINAL; (* Parameters are indexed from "0" (the command name) to "Count-1". *) PROCEDURE Get(n: CARDINAL): TEXT; (* Return the parameter with index "n". It is a checked runtime error if "n >= Count". *) END Params.