_CP_writev

_CP_writev


_CP_writet Index Level _CP_xtd
Syntax int _CP_writev(int type, CPSTR* string1, int expression1, CPSTR* string2, expression2)
Category C Interface
Type C Function
Description equivalent to the FlashBASIC statements: writev, writevu

type        FlashBASIC statement

_CP_WRITEV  writev string1 on expression1,string2,expression2

_CP_WRITEUV writevu string1 on expression1,string2,expression2

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.
Options
See Also C Functions introduction _CP_open _CP_close _CP_write _CP_read _CP_readv
Example The following example writes "hi" into attribute 1 of item "myid" in "myfile".

CPSTR * s = _CP_mkstr("myfile");
CPSTR * t = _CP_mkstr("hi");
CPSTR * id = _CP_mkstr("myid");
int f;

_CP_open(&f,_CP_str_null,s);
_CP_writev(_CP_WRITE, t, f, id, 1);
Warnings
Compatibility AP 6.1
_CP_writet Index Level _CP_xtd