std.conv issues

2009-11-11 Thread Yao Gomez
It seems that the 'to(T,S)' methods to convert from string to any integer, don't work when the number in the string is not in decimal system. I couldn't find neither in the documentation or the code a function to do this. Example: --- auto bin = to!long( "0b10111010" ); auto hex = tolong( "0xBAD

Re: Compilation constants

2009-11-11 Thread Phil Deets
On Wed, 11 Nov 2009 13:45:17 -0500, grauzone wrote: You can delete your posts to emulate editing... I didn't know it was possible to delete posts from a newsgroup. How do you do that? -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Re: Compilation constants

2009-11-11 Thread grauzone
Phil Deets wrote: On Wed, 11 Nov 2009 13:34:32 -0500, Phil Deets wrote: On Wed, 11 Nov 2009 13:30:17 -0500, Phil Deets wrote: On Wed, 11 Nov 2009 08:50:48 -0500, bearophile wrote: In a C program I have a numeric constant SIZE (that is in [1,32]), that I can define when I compile the co

Re: Compilation constants

2009-11-11 Thread Phil Deets
On Wed, 11 Nov 2009 13:30:17 -0500, Phil Deets wrote: On Wed, 11 Nov 2009 08:50:48 -0500, bearophile wrote: In a C program I have a numeric constant SIZE (that is in [1,32]), that I can define when I compile the code, like this: gcc -DSIZE=14 ... How can I do the same thing in D? The so

Re: Compilation constants

2009-11-11 Thread Phil Deets
On Wed, 11 Nov 2009 13:34:32 -0500, Phil Deets wrote: On Wed, 11 Nov 2009 13:30:17 -0500, Phil Deets wrote: On Wed, 11 Nov 2009 08:50:48 -0500, bearophile wrote: In a C program I have a numeric constant SIZE (that is in [1,32]), that I can define when I compile the code, like this:

Re: Compilation constants

2009-11-11 Thread Phil Deets
On Wed, 11 Nov 2009 08:50:48 -0500, bearophile wrote: In a C program I have a numeric constant SIZE (that is in [1,32]), that I can define when I compile the code, like this: gcc -DSIZE=14 ... How can I do the same thing in D? The solution I have found is to put in the D code: version(B

Re: error linking to my own custom module

2009-11-11 Thread Sean Fennell
Lars T. Kyllingstad Wrote: > torhu wrote: > > On 11.11.2009 04:57, Sean Fennell wrote: > >> I'm very green to D, just learning it now. > >> I have a module that I wrote. Its pretty simple, just helper > >> functions to get input from user as certain data types > >> GetInt() > >> GetString() > >>

Compilation constants

2009-11-11 Thread bearophile
In a C program I have a numeric constant SIZE (that is in [1,32]), that I can define when I compile the code, like this: gcc -DSIZE=14 ... How can I do the same thing in D? The solution I have found is to put in the D code: version(B1) const SIZE = 1; version(B2) const SIZE = 2; version(B3) cons

Re: Stdout.formatln crashed dmd1.051

2009-11-11 Thread Don
Sam Hu wrote: import tango.io.Stdout; void main() { Stdout.formatln; } dmd crashed. I've created bug 3495 for it.

Re: error linking to my own custom module

2009-11-11 Thread Lars T. Kyllingstad
torhu wrote: On 11.11.2009 04:57, Sean Fennell wrote: I'm very green to D, just learning it now. I have a module that I wrote. Its pretty simple, just helper functions to get input from user as certain data types GetInt() GetString() GetChar() etc... I compiled the module using dmd -lib mymo