User Tools

Site Tools


keychar_return_ascii_code_.htm
Navigation:  Language Reference > 13 - Built-in Functions < ====== KEYCHAR (return ASCII code) ====== Previous pageReturn to chapter overviewNext page

KEYCHAR( )

blk2blue.jpg

The KEYCHAR procedure returns the ASCII value of the last key pressed at the time the event occurred.

Return Data Type: UNSIGNED

Example:

ACCEPT                    !Wait for an event
  CASE KEYCHAR()          !Process the last keystroke
  OF VAL('A') TO VAL('Z') ! upper case?
     DO ProcessUpper
  OF VAL('a') TO VAL('z') ! lower case?
     DO ProcessLower
  END
END

See Also:

SETKEYCHAR

ASK

ACCEPT

KEYCODE

SELECT

VAL

CHR

keychar_return_ascii_code_.htm.txt · Last modified: 2021/04/13 22:31 by carlbarnes