digitalmars.D.learn - Octal to Decimal converter
- Todd (4/4) Oct 17 2007 Does anyone have a link to a Oct2Dec converter? I found ultox and xtoul,...
- Regan Heath (6/8) Oct 17 2007 So, you found this thread then?
- Todd Titus (5/9) Oct 18 2007 I imported std.c.stdlib and got a compile error along the lines of:
- Bill Baxter (3/17) Oct 18 2007 Try calling "std.c.stdlib.stroul" in your code instead of just "stroul".
- Todd (2/5) Oct 19 2007 thought of that last night. working great now.
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
Oct 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.htmlOctal 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
Oct 17 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. ReganI 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
Oct 18 2007
Todd Titus wrote:Try calling "std.c.stdlib.stroul" in your code instead of just "stroul". --bbstrtoul 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. ReganI 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
Oct 18 2007
Try calling "std.c.stdlib.stroul" in your code instead of just "stroul". --bbthought of that last night. working great now. Todd
Oct 19 2007