Pascal: Clearing the video screen

As described by Kenneth Bowles in Problem Solving Using Pascal, the routine
CLEARSCREEN is a system function of the UCSD computer facility. By issuing a
form feed to the standard Apple screen, the system intrinsic PAGE(OUTPUT) can
perform a similar function on your system.

You can use the following procedure to clear the screen.

PROCEDURE CLEARSCREEN;
BEGIN
WRITE (CHR(12));
END;

As in the SETUP program, the procedure uses the character CHR(12) to clear the
standard Apple video screen. Other external terminals may require a different
value; for these terminals, modify the procedure by replacing CHR(12) with the
appropriate control character (or characters) for "Erase Screen".
Published Date: Feb 18, 2012