Atol
This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.
Syntax
long atol(char s[]);
Function
This function converts the string s to a LONG number. The number base is decimal. Starting with string 0x, base 16 is used. Leading blanks are not read.
Parameters
String to be converted.
Return Values
Returns the converted long integer value.
long z1;
long z2;
z1 = atol("200");
z2 = atol("0xFF");
// Result: z1 = 200, z2 = 255