Difference between revisions of "SCREEN"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
imported>Clippy
Line 1: Line 1:
 +
The '''SCREEN''' function returns the ASCII code of a text character or the color attribute at a set location on the screen.
 +
 +
 +
''Syntax:'' code% = SCREEN (row, column [, colorflag])
 +
 +
 +
* Row and column are the text coordinates of the SCREEN mode used.
 +
* Colorflag omitted or with a value of 0 returns the ASCII code of a character at the position designated.
 +
* When Colorflag is greater than 0, the function returns the color attribute used.
 +
* Color values returned may not be correct in some screen modes.
 +
 +
 +
 +
''Example:'' Reading the ASCII code of a character, then the color used.
 +
 +
:row = 10
 +
:column = 10
 +
:code% = SCREEN(row, column, 0) ' character code return
 +
:attrib% = SCREEN(row, column, 1) ' character color return
 +
 +
 +
 +
''See also:'' [[SCREEN (statement)]], [[COLOR]], [[CHR$]]
 +
  
  

Revision as of 20:42, 7 September 2009

The SCREEN function returns the ASCII code of a text character or the color attribute at a set location on the screen.


Syntax: code% = SCREEN (row, column [, colorflag])


  • Row and column are the text coordinates of the SCREEN mode used.
  • Colorflag omitted or with a value of 0 returns the ASCII code of a character at the position designated.
  • When Colorflag is greater than 0, the function returns the color attribute used.
  • Color values returned may not be correct in some screen modes.


Example: Reading the ASCII code of a character, then the color used.

row = 10
column = 10
code% = SCREEN(row, column, 0) ' character code return
attrib% = SCREEN(row, column, 1) ' character color return


See also: SCREEN (statement), COLOR, CHR$


Navigation:

Go to Keyword Reference - Alphabetical

Go to Keyword Reference - By usage