QBasic 1.1: SCREEN Function
Explanation
SCREEN Function
Returns the ASCII value or color attribute of a character at a specified screen location.
Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Syntax
SCREEN (row%,column% [,colorflag%]) |
Description / Parameter(s)
row% |
The row coordinate of a character. |
column% |
The column coordinate of a character. |
colorflag% |
A value (0 or 1) that specifies what is returned. |
|
Value | Returns |
0 (or omitted) | The character's ASCII code. |
1 | The character's color attribute. |
|
Example
CLS
PRINT "Hello"
PRINT "The ASCII value of character at 1,1 is"; SCREEN(1, 1)