Ah

by (Login Mikrondel)
Moderator

 

Most of the time, INKEY$ returns "", that is, the empty string. This happens when there are no pending key presses. ASC will explode if you supply it with an empty string.

So, you'll want something like

IF LEN(KB$) = 1 THEN 'if there actually is a key press
PRINT ASC(KB$)
END IF

in your loop.

Posted on Feb 23, 2010, 5:03 PM

Respond to this message   

Return to Index

Response TitleAuthor and Date
Thanks..works great now....unseenmachine on Feb 23
RE: "This happens when there are no pending key presses"Galleon on Feb 27
 i knowunseenmachine on Feb 28

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