atol
- Updated2023-02-21
- 1 minute(s) read
atol
long atol (const char stringInput[]);
Purpose
Converts the initial portion of a string to a long int
representation. This function is equivalent to the following:
strtol(stringInput, (char **) NULL, 10)
Parameters
Input | ||
Name | Type | Description |
stringInput | const char [] | Contains a pointer to the character sequence from which a conversion is made. |
Return Value
Name | Type | Description |
convertedValue | long | Contains the converted value, if any. If no conversion is possible, the function returns zero. If the correct value is outside the range of representable values, atol returns LONG_MAX or LONG_MIN, according to the sign of the value, and sets errno to ERANGE. |
Additional Information
Library: ANSI C Library
Include file: ansi_c.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later