| _CP_readt | Index Level | _CP_release |
| Syntax | int _CP_readv(int type, CPSTR** result, int expression1, CPSTR* string, int expression2, int* value) |
| Category | C Interface |
| Type | C Function |
| Description |
equivalent to the FlashBASIC statement: readv
Depending upon type, _CP_read acts as the following FlashBASIC commands: type FlashBASIC statement _CP_READV readv result from expression1, string, expression2 _CP_READVU readvu result from expression1, string, expression2 _CP_READVUL readvu result from expression, string, expression2 The value parameter returns a 1 if the item is locked. If value is not needed, the user may pass (int*) 0. The _CP_readv call uses the same optimized read routine as FlashBASIC which, from release 6.1 and later, is about 2-5 times faster than that which is used by Access and standard Pick/BASIC. The expression1 should be an integer file descriptor returned by the _CP_open call. This function returns -1 if an error occurs. The error code is contained in _CP_errno. If the attribute number is bad, then _CP_errno will contain PE_BADATTR. |
| Options | |
| See Also | C Functions introduction _CP_writev |
| Example |
/* The following example reads the first attribute of the item "myid" from "myfile". */
CPSTR * s = _CP_mkstr("myfile"); CPSTR * id = _CP_mkstr("myid"); CPSTR * xx = _CP_str_null; int f; _CP_open(&f,_CP_str_null,s); _CP_readv(_CP_READV, xx, f, id, 1, 0); |
| Warnings | |
| Compatibility | AP 6.1 |
| _CP_readt | Index Level | _CP_release |