_CP_writet

_CP_writet


_CP_write Index Level _CP_writev
Syntax int _CP_writet(int type, CPSTR* string)
Category C Interface
Type C Function
Description equivalent to the FlashBASIC statements: writet

type                 FlashBASIC statement

_CP_WRITET_ELSE      writet string else return -1
_CP_WRITET_ONERR     writet string onerr return -1
_CP_WRITET_L_ELSE    writetl string onerr return -1
_CP_WRITET_L_ONERR   writetl string 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.
Options
See Also C Functions introduction _CP_weof _CP_readt
Example The following example writes the next tape block.

CPSTR * xx = _CP_mkstrl("data",4);

_CP_writet(_CP_WRITET_ELSE, xx);
Warnings The tape must have been already attached.
Compatibility AP 6.1
_CP_write Index Level _CP_writev