prg_string_to_integer()
Abstract
Converts a string representing an integer value to an integer.
Syntax
prg_string_to_integer (int_str, ival_ptr)
| Argument | Type | Description |
|---|---|---|
int_str |
const char * |
The string to be converted. |
ival_ptr |
int * |
Area in which to store the converted integer. |
Return Type
PrgT_Compcode
PrgC_Compcode_Success if the conversion is successful; PrgC_Compcode_Failure otherwise.
Header
prg_string_funcs.h
Details
This function removes spaces and the local thousands separator (such as comma) from int_str, then converts the resulting string and sets ival_ptr to either the integer value or one of the following symbolic constants:
VOSC_NA_INT_INFINITY |
Infinity: largest possible signed integer |
-VOSC_NA_INT_INFINITY |
Disabled: for boolean integers |
VOSC_NA_INT_UNDEF |
Undefined: for divide by zero or otherwise ill-defined results of integer computations |
VOSC_TRUE |
Enabled or True: for ordinary booleans |
VOSC_FALSE |
False: for ordinary booleans |