_CP_oconv

_CP_oconv is equivalent to the result = oconv(string1, string2) BASIC statement.

Syntax

int _CP_oconv(CPSTR** result, CPSTR* string1, CPSTR* string2)

Description

This function returns -1 if an error occurs. The error code is contained in _CP_errno.

NOTE

This function is provided for convenience only. It requires considerable amounts of CPU, as it must parse the format string (string2) at run-time (which is also true of the UNIX printf() function). Unless contact with the D3 environment is absolutely required for the conversion, it is suggested that users write their own formatting routines to address their specific requirements in a more efficient manner.

Example(s)

CPSTR * s = _CP_mkstr("a2");

CPSTR * t = _CP_mkstr("mca");

 

_CP_oconv(&s,s,t);

_CP_print(s);

Prints "a".

See Also

C Functions Overview