' LOCATE-1.BAS
' This program demonstrates the LOCATE statement.

CLS

INPUT "Please enter the row coordinate (1-24):  ", rowNum%
PRINT
INPUT "Please enter the column coordinate (1-80):  ", colNum%
PRINT
INPUT "Please enter a message to display:  ", message$

CLS

FOR i% = 0 TO 70 STEP 10      ' print column coordinates across
    PRINT "1234567890";       '   the top of the screen
NEXT i%

FOR i% = 2 TO 23              ' print the row numbers along the
    LOCATE i%, 1              '   left-hand side of the screen
    PRINT LTRIM$(STR$(i%))    ' don't print the blank space
NEXT i%                       '   before each number

LOCATE rowNum%, colNum%       ' print the message at the user-
PRINT message$                '   supplied coordinates



