Thread overview
Octal to Decimal converter
Oct 17, 2007
Todd
Oct 17, 2007
Regan Heath
Oct 19, 2007
Todd Titus
Oct 19, 2007
Bill Baxter
Oct 19, 2007
Todd
October 17, 2007
Does anyone have a link to a Oct2Dec converter? I found ultox and xtoul, many thanks to SpottedTiger.

Octal to decimal seem a little harder to locate.

Todd

October 17, 2007
Todd wrote:
> Does anyone have a link to a Oct2Dec converter? I found ultox and xtoul, many thanks to SpottedTiger.

So, you found this thread then?

http://www.digitalmars.com/d/archives/digitalmars/D/learn/read_Hexadecimal_value_from_string_8632.html

> Octal to decimal seem a little harder to locate.

strtoul decalred in std.c.stdlib will probably do what you want, google for it's MAN page or similar.  Or as Frank suggested Tango has it covered.

Regan
October 19, 2007
> strtoul decalred in std.c.stdlib will probably do what you want, google for it's MAN page or similar.  Or as Frank suggested Tango has it covered.
> 
> Regan

I imported std.c.stdlib and got a compile error along the lines of:
data type std.c.stdlib stroul conflicts with stdlib stroul...
so I tried using stroul in stdlib by itself but it will require several conversions to make it work correctly.

Think I will write a function from scratch, wish me luck :)

Todd


October 19, 2007
Todd Titus wrote:
>> strtoul decalred in std.c.stdlib will probably do what you want, google for it's MAN page or similar.  Or as Frank suggested Tango has it covered.
>>
>> Regan
> 
> I imported std.c.stdlib and got a compile error along the lines of:
> data type std.c.stdlib stroul conflicts with stdlib stroul...
> so I tried using stroul in stdlib by itself but it will require several conversions to make it work correctly.
> 
> Think I will write a function from scratch, wish me luck :)
> 
> Todd
> 
> 

Try calling "std.c.stdlib.stroul" in your code instead of just "stroul".

--bb
October 19, 2007
> Try calling "std.c.stdlib.stroul" in your code instead of just "stroul".
> 
> --bb

thought of that last night. working great now.

Todd