Skip to content
ve3wwg edited this page Oct 12, 2014 · 1 revision

Table of Contents

NC-GETCH

This API waits for the user to type at least one character before returning to the caller. Either a special key code is returned in NC-KEY-CODE or a character is returned in NC-KEY-CHAR. When 88 level item IS-KEY-CODE is true, the value is returned in NC-KEY-CODE instead of NC-KEY-CHAR.

Key codes are defined in the copy book COBCKEYS.

Copy Book

COBCURSQ

Call

    PERFORM NC-GETCH

Inputs

None.

Outputs

    01  NC-COBCURSES.
        10  NC-KEY-DATA.
            20  NC-KEY-CODE-FLAG        PIC X(1).
                88  IS-KEY-CODE         VALUE 'Y'.
            20  NC-KEY-CODE             PIC 9999 COMP-5.
            20  NC-KEY-CHAR             PIC X.
  1. Value is in NC-KEY-CHAR when IS-KEY-CODE is false.
  2. Value is in NC-KEY-CODE when IS-KEY-CODE is true.
  3. Key codes are defined in copy book COBCKEYS.
RETURN-CODE Notes
NC-RET-OK Successful

Notes

  1. Avoid referencing the value NC-KEY-CODE-FLAG for maximum portability to future versions of CobCurses. Use the 88 level item instead.

Return to the COBCURSQ API Index.
Clone this wiki locally