| _CP_footing | Index Level | _CP_heading |
| Syntax | int _CP_get(int type, CPSTR** result, int expression1, int expression2, int expression3, CPSTR* string1, CPSTR** string2, int expression4) |
| Category | C Interface |
| Type | C Function |
| Description |
equivalent to the FlashBASIC statement: get result, expression1 setting expression2 from expression3 until string1 returning string2, waiting expression4
The type parameter is bit mask that may be used to set various options: _CP_GET_X the "getx" form of get. _CP_GET_LEN a desired length is present. _CP_GET_SET a setting parameter is present. _CP_GET_UNTIL a until parameter is present. _CP_GET_RTN a returning parameter is present. _CP_GET_WAIT a waiting parameter is present. _CP_GET_THEN_ELSE then/else condition. _CP_GET_ELSE else only condition. This function returns -1 if an error occurs. The error code is contained in _CP_errno. |
| Options | |
| See Also | C Functions introduction |
| Example |
/* The following example gets input from port 1. */
CPSTR * s = _CP_mkstr("dev-att 1"); CPSTR * c = _CP_str_null; CPSTR * r = _CP_str_null; _CP_execute(_CP_EXECUTE,s,&c,&r); _CP_get(_CP_GET_X+_CP_GET_LEN, &r, 1, 0, 1, c, &c, 50); |
| Warnings | |
| Compatibility | AP 6.1 |
| _CP_footing | Index Level | _CP_heading |