Manifest constants (was const again)
Lukas Pinkowski
Lukas.Pinkowski at web.de
Thu Dec 6 14:40:40 PST 2007
Janice Caron wrote:
> Hoping to branch this off to a new thread to avoid polluting the const
> one...
>
> On 12/6/07, Walter Bright <newshound1 at digitalmars.com> wrote:
>> That leaves what to do about manifest constants. It occurs that we
>> already have a mechanism for them - enums. So why not:
>> enum x = 3;
>> enum long y = 4;
>> ? I think that solves our problem.
>
> Will it work for reals?
>
> enum pi = 3.14159265358979;
>
> ?
I just try to imagine this one:
enum ireal x = ...
Enumerable imaginary real -> many mathematicians rotating in their
graves ;-)
More information about the Digitalmars-d
mailing list