_CP_send

_CP_send


_CP_select Index Level _CP_si_
Syntax int _CP_send(int type, CPSTR* string, int port.number)
Category C Interface
Type C Function
Description equivalent to the FlashBASIC statement: send{x} string{:} to port.number

The type parameter is a bit mask that may be used to set various options that must or'ed together:

_CP_SEND_X  requests the "sendx" form of send.
_CP_SEND_N  suppresses the new-line
_CP_SEND_ELSE  indicates an else 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 sends "hi" to port 1. */

CPSTR * s = _CP_mkstr("dev-att 1");
CPSTR * t = _CP_mkstr("hi");
CPSTR * c = _CP_str_null;
CPSTR * r = _CP_str_null;

_CP_execute(_CP_EXECUTE_C,s,&c,&r);
_CP_send(0, t, 1);
Warnings
Compatibility AP 6.1
_CP_select Index Level _CP_si_