Currently At: Programming Reference > C Reference > Standard C String & Character > atol()

atol()


Syntax:
#include <stdlib.h>
long atol( const char *str );


Description:
The function atol() converts str into a long, then returns that value. atol() will read from str until it finds any character that should not be in a long. The resulting truncated value is then converted and returned.

Example:
x = atol( "1024.0001" );

RESULT: x set to 1024L.


Related Topics:
atof(), atoi()


Web Standards & Support:

Link to and support eLook.org Powered by LoadedWeb Web Hosting
Valid XHTML 1.0! Valid CSS! eLook.org FireFox Extensions