Operating System - HP-UX
1752810 Members
5891 Online
108789 Solutions
New Discussion юеВ

Re: atoll compatibility problem

 
Ashu Jaiswal
New Member

atoll compatibility problem

hi,
does someone know of a compatible function on hp-ux which is compatible with atoll (ascii to long long)? i'm trying to read in a string value and trying to convert it to long long. i tried using atol() and strtoul(), but they both return a return value 0, when the ascii representation exceeds a value of 2^30. i need to read an integer value greater than 2^32 and use it.
thanks
Ashu
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor

Re: atoll compatibility problem

Hi Ashu,

I couldn't find an atoll() equivalent but it was so easy I decided to code one for you in about 2 minutes.

Enjoy, Clay
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: atoll compatibility problem

Hi Ashu,

A slighty better version which skips over leading whitespace just like the real thing.

Clay
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: atoll compatibility problem

Hi Ashu,

A slighty better version which skips over leading whitespace just like the real thing.

Clay
If it ain't broke, I can fix that.