cfunc.convert
Pick/BASIC 'convert' functionality from C.
Syntax
int _CP_convert(CPSTR** result, CPSTR* string1, CPSTR* string2)
Description
equivalent to the Pick/BASIC statement: convert string1 to string2 in result
This function returns -1 if an error occurs. The error code is contained in _CP_errno.
Example
/* The following example prints 'bbc'. */
CPSTR * s = _CP_mkstr('a');
CPSTR * t = _CP_mkstr('b');
CPSTR * u = _CP_mkstr('abc');
_CP_unix_env();
_CP_convert(&u,s,t);
_CP_TERM(u);
printf('%s\n',_CP_SADDR(u));
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.
