VIEW PRINT Statement Action Sets the boundaries of the screen text viewport. Syntax VIEW PRINT topline% TO bottomline% Remarks The argument topline% is the number of the upper line in the text viewport; bottomline% is the number of the lower line. Without topline% and bottomline% parameters, the VIEW PRINT statement initializes the whole screen area as the text viewport. The number of lines in the screen depends on the screen mode and whether or not the -H option was used when BASIC was started. For more information, see the entry for the WIDTH statement, and Chapter 3, "File and Device I-O" in the Programmer's Guide. Statements and functions that operate within the defined text viewport include CLS, INPUT, LOCATE, PRINT, the SCREEN function, and WRITE. See Also CLS, LOCATE, PRINT, SCREEN Function, SCREEN Statement, WIDTH Example The following example draws random circles in a graphics viewport and prints in a text viewport. The graphics viewport is cleared after 30 circles have been drawn. The program clears the text viewport after printing to it 45 times. RANDOMIZE TIMER SCREEN 1 ' Set up a graphics viewport with a border. VIEW (5, 5)-(100, 80), 3, 1 ' Set up a text viewport. VIEW PRINT 12 TO 24 ' Print a message on the screen outside the text viewport. LOCATE 25, 1. PRINT "Press any key to stop." Count = 0 DO ' Draw a circle with a random radius. CIRCLE (50, 40), INT((35 - 4) * RND + 5), (Count MOD 4) ' Clear the graphics viewport every 30 times. IF (Count MOD 30) = 0 THEN CLS 1 PRINT "Hello. "; ' Clear the text viewport every 45 times. IF (Count MOD 45) = 0 THEN CLS 2 Count = Count + 1 LOOP UNTIL INKEY$ <> ""