cfunc.input C Function/C Functions

cfunc.input

Command cfunc.input C Function/C Functions
Applicable release versions: AP 6.1
Category C Functions (120)
Description equivalent to the Pick/BASIC statements: input

type Pick/BASIC statement

_CP_INPUT input result
_CP_INPUT_N input result:
_CP_INPUT_L input result, expression1
_CP_INPUT_LN input result, expression1:
_CP_INPUT_L_ input result, expression1_
_CP_INPUT_LN_ input result, expression1:_
_CP_INPUT_LF input result, expression1 for expression2
_CP_INPUT_LNF input result, expression1: for expression2
_CP_INPUT_L_F input result, expression1_ for expression2
_CP_INPUT_LN_F input result, expression1:_ for expression2

This function returns -1 if an error occurs. The error code is contained in _CP_errno. If the timeout occurs, _CP_errno contains PE_TMOUT.
Syntax int _CP_input(int type, CPSTR** result, int expression1, int expression2)
Options
Example
/* The following example gets 1 line of input. */

CPSTR * s = _CP_str_null;

_CP_input(_CP_INPUT, &s, 0, 0);
Purpose
Related