Hello everybody ,
I am porting an application from hp-ux to red hat enterprise linux 3.0 .
in one of the source codes there is this conversion done of a decimal number to a number with a given base . which is called the string representation of the decimal number . the function is ltoastr .
syntax :
ltoastr(long integer , base ) ex : ltoastr(157 . 16) .
this is will convert the number 157 to its base 16 representation .
this is a library function and its in HP-Unix . i need a similar function which provides the same functionality in Red Hat Enterprise Linux 3.0 . I am trying to find t it . However if anyone knows about it would you plz pass on the same information at manoj.bohara@wipro.com . I will be highly obliged .
Regards Manoj Bohar wipro technologies .
Manoj Bohara
"If we try , we risk failure but if we don't we ensure it . " --------------------------------- Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups.
On 04/08/06 00:04 -0700, Manoj Bohara wrote:
Hello everybody ,
I am porting an application from hp-ux to red hat enterprise linux 3.0 .
in one of the source codes there is this conversion done of a decimal number to a number with a given base . which is called the string representation of the decimal number . the function is ltoastr .
Does it handle a random base? Or only specific cases? Implementing one is trivial. For conversion to base 16, use sprintf(3).
*wonders why people would actually spend more time asking about base conversion functions when those are trivial to write*.
Devdas Bhagat