' VIEW.BAS
' This program demonstrates the VIEW PRINT statement.

CLS

PRINT "Welcome to the VIEW program!!"  ' print intro message
PRINT
PRINT "Let's watch some things scroll by..."
PRINT STRING$(80, "-");                ' print top line

LOCATE 24, 1: PRINT STRING$(80, "-");  ' print bottom line
LOCATE 25, 1: INPUT ; "Press Enter to start the program... ", dummy$

VIEW PRINT 5 TO 23                     ' enable viewport (lines 5-23)

COLOR 2                                ' set color to green
FOR i% = 1 TO 200
    PRINT "This is line"; i%           ' print message 200 times
NEXT i%
COLOR 7                                ' set color to default white

VIEW PRINT                             ' disable viewport
LOCATE 25, 1: INPUT ; "Press Enter to clear the viewport... ", dummy$
VIEW PRINT 5 TO 23                     ' enable viewport
CLS 2                                  ' clear viewport only

