Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - iskey() return if a key press is available http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 iskey()             Return if a key press is available
------------------------------------------------------------------------------
 Declaration
   io.hdr

 Syntax
   func uint iskey extern

 Arguments
   None.

 Return
   The code of the first available keypress.

 Description
   The iskey() 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 key.hdr header file.

 Example
   #define EXAMPLE_IO
   #include example.hdr

   proc Test_iskey
   ? "Press any key to abort..."
   do while iskey() == 0         // wait for a key to be pressed
      // do processing here
   enddo
   endproc

   proc main
   Test_iskey()
   endproc

See Also: getkey() inkey()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson