C Functions
_CP_input
.md_CP_input is equivalent to the input BASIC statement.
| Type | 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 |
Syntax
int _CP_input(int type, CPSTR** result, int expression1, int expression2)
Description
This function returns -1 if an error occurs. The error code is contained in _CP_errno. If the time out occurs, _CP_errno contains PE_TMOUT.
Note: The environment must be set to _CP_pick_env() for _CP_input() to work
properly.
Example(s)
/* Gets 1 line of input. */ CPSTR * s = _CP_str_null; _CP_input(_CP_INPUT, &s, 0, 0);