| Bookmark Name | Actions |
|---|
LIBUTILS
The libutils shared library enables you to code terminal independent code to handle keyboard input.
For example:
* Include key definitions INCLUDE jCmdKeys.h * Initialize command key strings CALL JBASECommandInit TimeOut = 150 ;* Set timeout value deciseconds ECHO OFF LOOP * Get Next Command Value CALL JBASECommandNext(RetNo, RetString, TimeOut) * RetNo should match numbers in include/header file BEGIN CASE CASE RetNo = cmd_cursor_up CRT "CURSOR UP" CASE RetNo = cmd_cursor_down CRT "CURSOR DOWN" CASE RetNo = cmd_cursor_left CRT "CURSOR LEFT" CASE RetNo = cmd_cursor_right CRT "CURSOR RIGHT" CASE RetNo = cmd_alpha_numeric CRT "ALPHANUMERIC" CASE RetNo = cmd_timeout CRT "TIMEOUT" BREAK END CASE * Output the actual string returned CRT "RetString :":OCONV(RetString,"MCP.") REPEAT
Add Bookmark
save your best linksView Bookmarks
Visit your best linksIn this topic
Are you sure you want to log-off?