cfunc.num C Function/C Functions

cfunc.num

Command cfunc.num C Function/C Functions
Applicable release versions: AP 6.1
Category C Functions (120)
Description equivalent to the Pick/BASIC function: result = num(string)

This function returns -1 if an error occurs. The error code is contained in _CP_errno.
Syntax int _CP_num(int* result, CPSTR* string)
Options
Example
/* is "1" alphabetic? */

CPSTR * s = _CP_mkstr("1");
int i;

_CP_num(&i,s);
_CP_unix_env();
printf("%dn", i);
Purpose
Related cfunc.introduction