The rstoi() function
The rstoi() function converts a null-terminated string into a short integer value.
Syntax
mint rstoi(string, ival)
char *string;
mint *ival;
- string
- A pointer to the null-terminated string to convert.
- ival
- A pointer to a mint variable to contain the converted value.
Usage
The legal range of values is -32767
- 32767
.
The value -32768
is not valid because this value
is a reserved value that indicates null.
If string corresponds to a null integer, ival points to the representation for a SMALLINT null. To convert a string that corresponds to a long integer, use rstoi(). Failure to do so can result in corrupt data representation.
Return values
- =0
- The conversion was successful.
- !=0
- The conversion failed.