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: 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: 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 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 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: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-12 Thread Chris Nicholson-Sauls
Phil Deets wrote: 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? I don't know about any other readers, but using Thunderbird just right-click the messa

Re: Compilation constants

2009-11-12 Thread Phil Deets
On Thu, 12 Nov 2009 07:17:57 -0500, Chris Nicholson-Sauls wrote: Phil Deets wrote: 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? I don't know abo