cfunc.readt
Pick/BASIC 'readt' functionality from C.
Syntax
int _CP_readt(int type, CPSTR** result)
Description
equivalent to the Pick/BASIC statements: readt
Which flavor of 'readt' is dependent upon the command 'type'.
type Pick/BASIC statement
_CP_READT_ELSE readt result else * return -1
_CP_READT_L_ELSE readtl result else * return -1
_CP_READTX_ELSE readtx result else * return -1
_CP_READT_ONERR readt result onerr * return -1
_CP_READT_L_ONERR readtl result onerr * return -1
_CP_READTX_ONERR readtx result onerr * return -1
This function returns -1 if an error occurs. The error code is contained in _CP_errno. PE_TAPE indicates a tape error.
Example
/*The following example prints the next tape block.*/
CPSTR * xx = _CP_str_null;
_CP_readt(_CP_READT_ELSE, xx);
_CP_print(xx);
See Also
User Comments
What do you think?
Share your experience or ask a question by using the form below.
Login to leave your comments.
