You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
INKEY does not appear to support the option to use negative numbers to check if a particular key is being pressed, it looks as if its treating the negative as just a large number and waiting a long time before continuing.
INKEY (not INKEY$) has an extended functionality in that it can be used to test for individual keys being pressed. To do this, we give it a negative argument. The table of values used to represent the required key is not related to the ASCII code and is given in full in the help files under INKEY / INKEY$. When used in this way, it returns immediately with a value of TRUE (–1) or FALSE (0) depending on whether the required key was pressed. Again, this is really good for games:
The text was updated successfully, but these errors were encountered:
INKEY does not appear to support the option to use negative numbers to check if a particular key is being pressed, it looks as if its treating the negative as just a large number and waiting a long time before continuing.
From https://www.bbcbasic.co.uk/bbcwin/tutorial/chapter13.html
INKEY (not INKEY$) has an extended functionality in that it can be used to test for individual keys being pressed. To do this, we give it a negative argument. The table of values used to represent the required key is not related to the ASCII code and is given in full in the help files under INKEY / INKEY$. When used in this way, it returns immediately with a value of TRUE (–1) or FALSE (0) depending on whether the required key was pressed. Again, this is really good for games:
The text was updated successfully, but these errors were encountered: