On Sat, 18 Jul 2009 16:55:51 +0200, "Lars T. Kyllingstad" <[email protected]> wrote:
>Nick Sabalausky wrote: >> "Lars T. Kyllingstad" <[email protected]> wrote in message >> news:[email protected]... >>> I can't seem to find an existing report on this issue in Bugzilla, but I >>> find it hard to believe this hasn't been noticed before. That's why I >>> thought I'd bring it up here before writing a bug report. >>> >> >> Enums have historically been so screwy (buggy) in D maybe people have been >> avoiding them. Or, maybe I'm not the only one who insists on using "const" >> for constants instead of "enum", even though D1's const doesn't actually >> create a true constant (It'd be rare to see an attempt to use a *real* >> enumeration value in that mannar). > > >I'm using D2, and if I'm not mistaken enum is the only way to define >manifest constants. > >It would be nice to know if anyone can reproduce this bug. In that case >I'll add it to Bugzilla. > >-Lars This is obviously a bug. Please add it. A possible workaround: enum { real ONE = 1.0 } for (real x=0.0; x<=10.0; x+=ONE) writeln(x);
