%begin; !Print file through terminal
%include "inc:util.imp"

%constinteger ff=12,cr=13
%string(255)file
%integer i

  %onevent 3,9 %start
    ->end %if event_event=9
    printstring(event_message); newline
    %stop
  %finish

  file = cliparam
  openinput(1,file); selectinput(1)
  printstring("Press PRINT button, then hit RETURN")
  %cycle
    i = testsymbol %until i>=0
  %repeatuntil i<' '
  %cycle
    printsymbol(readsymbol)
  %repeat
end:
  printstring(file." finished.  Press PRINT and hit RETURN"); newline
  printsymbol(ff)
  i = testsymbol %until i<0
  %cycle
    i = testsymbol %until i>=0
  %repeatuntil i<' '
%end
