| C N V _ A L T O U L O N G ( )
| | | | | SOURCE: qdev_autodocs.txt 1.163 (12/09/2014) English INDEP - CNV_#?
----------------------------------------------------------------------------
NAME
cnv_ALtoULONG() - Converts stringified, digit grouped
number to integer.
SYNOPSIS
success = cnv_ALtoULONG(string, value, flags);
LONG cnv_ALtoULONG(UBYTE *, ULONG *, ULONG);
FUNCTION
This func. is able to convert numbers who were digit
grouped by the locale affected string generators, thus
the letter 'L' in the function name.
INPUTS
string - NULL terminated string that contains a number.
value - Pointer to integer variable. It must be of the
size pointer is! Dont pass pointers to 'UBYTE',
or 'UWORD' sized datatypes or memory will be
trashed!!!
flags - Base(2,8,10,16), see header file for defines.
RETURNS
Function will return -1 if converted value in negative.
0 will be returned if conversion failed and 1 if the
value is positive. Value of -666 will be returned if
there was an underflow and 666 for overflow.
BASES
None.
NOTES
This func. is a wrapper to 'cnv_AtoULONG()' which skips
on white spaces, single quotes, commas and dots.
UQUAD variant of this function exists.
SEE ALSO
cnv_AtoULONG(), cnv_ULONGtoA()
EXAMPLE
...
ULONG value = 0;
UBYTE *string;
/*
* This is essentially possible with this function.
*/
string = " 0 x 1000 2000 ";
if ((cnv_ALtoULONG(string, &value, QDEV_CNV_UXXXFBE_H)))
{
if (value == 0x10002000)
{
...
}
}
BUGS
None known.
----------------------------------------------------------------------------
| |
| |