SCREEN$
Statement/Command
SCREEN$ detects which character appears at a particular location on the screen.
How to use SCREEN$
SCREEN$ is followed by two numeric values separated by a comma and enclosed in brackets, for example
160 IF SCREEN$(l,c)="X" THEN PRINT "CRASH"
The values following SCREEN$ are rounded down to the nearest integer if necessary. The first value (l above) may then range from 0 to 21 and gives the line (or row) number of a position on the screen. The second value (c above) may range from 0 to 31 and gives the column number of the position. SCREEN$ then returns the character displayed at this position as a string constant (the character in quote marks, "X" above for example). If no character is present (or recognisable) at this position, SCREEN$ returns a null (empty) string (""). SCREEN$ cannot detect user-defined graphics unless they are identical to regular alpha-numeric characters.
Note that SCREEN$ may also be used with SAVE and LOAD to store the screen display in a file and also to load it from that file. See SAVE SCREEN$ and LOAD SCREEN$ for further details.
Format
- SCREEN$ (int-num-expr, int-num-expr)
See also