BEGIN
COMMENT THIS PROGRAM TESTS THE INTEGER FILE OPERATIONS. IT OPENS
        A FILE AND READS INTEGERS FROM IT AND WRITES THEM
        TO THE CONSOLE AND TO ANOTHER FILE;

INTEGER A,B,C;
FILE    FILE1,FILE2;
FILE1:="RFILE.INP"; %THIS ASSIGNS AND OPENS RFILE.INP%
FILE2:="WFILE.OUT"; %THIS ASSIGNS AND OPENS WFILE.OUT%
FOR A:=1 STEP 1 UNTIL 16 DO
  BEGIN
    READ FILE1(B,C);
    WRITE FILE2(B,C);
    WRITE(B,C);
  END;
END
EOF
