Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

libutils

The libutils shared library is provided to enable users to code terminal independent code to handle keyboard input. For example: 

* Include key definitions
INCLUDE jCmdKeys.h
* Initialize command key strings
CALL CommandInit
TimeOut = 150 ;* Set timeout value deciseconds
ECHO OFF
LOOP
    * Get Next Command Value
    CALL CommandNext(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



Was this article helpful?