17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

GW-BASIC <strong>User's</strong> Guide<br />

SCREEN Function<br />

Purpose:<br />

To return the ASCII code (0-255) for the character at the specified row (line) and column on the<br />

screen.<br />

Syntax:<br />

x=SCREEN(row,col[,z])<br />

Comments:<br />

x is a numeric variable receiving the ASCII code returned.<br />

row is a valid numeric expression within the range 1 to 25.<br />

col is a valid numeric expression 1 to 40, or 1 to 80, depending upon screen width setting. See<br />

the WIDTH statement.<br />

z is a valid numeric expression with a true or false value. It may be used only in alpha mode.<br />

The ordinal of the character at the specified coordinates is stored in the numeric variable. In alpha<br />

mode, if the optional parameter z is given and is true (nonzero), the color attribute for the<br />

character is returned instead of the ASCII code for the character (see the COLOR statement).<br />

Any values entered outside of the range indicated result in an "Illegal function call"<br />

error. Row 25 may be referenced only if the function key is off.<br />

Examples:<br />

100 X=SCREEN (10, 10)<br />

If the character at 10,10 is A, then X is 65.<br />

110 X=SCREEN (1, 1, 1)<br />

Returns the color attribute of the character in the upper-left corner of the screen.<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/SCREENF.html28/03/2004 21.29.46

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!