MODULE echo; (*David Egan Evans 2014-10-31/2015-12-05*) FROM ST IMPORT getarg, putc; FROM STchars IMPORT BLANK, NEWLINE; FROM STstrings IMPORT MAXSTR, length, string; PROCEDURE echo; (*Echo command line arguments to output.*) VAR i, j: INTEGER; argstr: string; BEGIN i := 1; WHILE (getarg(i, argstr, MAXSTR)) DO IF (i > 1) THEN putc(BLANK) END; FOR j := 1 TO length(argstr) DO putc(argstr[j]) END; INC(i) END; IF (i > 1) THEN putc(NEWLINE) END END echo; BEGIN echo END echo.