
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FORCE Data Base Compiler - ##############################################################################
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
##############################################################################
###+----------+###############################################################
#+-| IS_KEY() |-----------------------------------------------------------+###
#| +----------+ Returns 0 if no key is available or key value if a key is |###
#+------------------------------------------------------------------------+###
##############################################################################
##############################################################################
#+--| Summary |------------+##################################################
#| #INCLUDE io.hdr |##################################################
#+-------------------------+##################################################
##############################################################################
##############################################################################
#+--| Syntax |----------------------------+###################################
#| FUNCTION UINT is_key PROTOTYPE |###################################
#+----------------------------------------+###################################
##############################################################################
##############################################################################
#########+---| Description |---------------------------------------+##########
#########| The is_key function returns 0 if no key is available or |##########
#########| the key value if a key is available, leaving the key in |##########
#########| the keyboard buffer. Key values are defined within the |##########
#########| keys.hdr header file. |##########
#########+---------------------------------------------------------+##########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Wait for a key to be pressed. |#########
#########| |#########
#########| ? "Press any key to abort..." |#########
#########| DO WHILE is_key() = 0 |#########
#########| {...} |#########
#########| ENDDO |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Abort a database command if a key is pressed. |#########
#########| |#########
#########| !acct SUM acct->tax WHILE is_key() = 0 TO total |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also: delay() get_key() inkey() lastkey() no_burn_key()
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson