_CP_field

_CP_field


_CP_extract Index Level _CP_field_store
Syntax int _CP_field(CPSTR** result, CPSTR* string1, CPSTR* string2, int expression)
Category C Interface
Type C Function
Description is equivalent to the FlashBASIC statement: result = field(string1, string2, expression)

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 prints "ab 2 5" */

CPSTR * s = _CP_mkstr("zdabdz");
CPSTR * t = _CP_mkstr("d");
int i,j;

_CP_field(&s,s,t,2);
_CP_col1(&i);
_CP_col2(&j);
_CP_TERM(s);
_CP_unix_env();
printf("%s %d %d\n",_CP_SADDR(s),i,j);
Warnings
Compatibility AP 6.1
_CP_extract Index Level _CP_field_store