That's simple -- use the SCREEN function...

by TheBOB (Login qb432l)


The SCREEN function returns the ASCII value of a character at a specific Row/Column location. For example:


On a blank screen this will return 32 (space). If there is a character there, it will return its ASCII value.

You can also determine the attribute of that character (if you need it):

PRINT SCREEN (20, 20, 1) 'zero or 3rd argument left out returns ASCII value, 1 for a 3rd argument returns the attribute value.

On a blank screen, the above will return 7 (attribute 7), even if there is nothing printed there since 7 is the default foreground color.

For your purposes use:

IF SCREEN (Row, Col) = 32 THEN 'in other words, if there is a space there


This message has been edited by qb432l on Jan 11, 2010 9:01 AM

Posted on Jan 11, 2010, 8:09 AM

Respond to this message   

Return to Index

Response TitleAuthor and Date
So i should writeLisztfr on Jan 11
 Yes, when testing, however...TheBOB on Jan 11
  Do you think he is just looking for a conditional print statement here?Pete on Jan 11
   Sure...TheBOB on Jan 11
  I would not even use CSRLIN or POS. Too messy!Clippy on Jan 11
   *Good point -- only use the SCREEN function for ASCII values in graphics modes.TheBOB on Jan 11

 Copyright © 1999-2018 Network54. All rights reserved.   Terms of Use   Privacy Statement