switch case for constants-only?
Ellery Newcomer
ellery-newcomer at utulsa.edu
Sat Dec 5 19:34:48 PST 2009
On 12/05/2009 09:20 PM, Don wrote:
> Nick Sabalausky wrote:
>> I just noticed in D1 that the values for the cases in a switch must be
>> known at compile-time (btw, the docs don't seem somewhat vague on
>> that). Is this also true in D2? If so, I don't suppose we could get
>> that changed before the book? It's a real PITA for dynamic code.
>
> I actually tested this. I was surprised. In D2, variables are allowed...
>
But not dynamic ones
It is a surprise though.
More information about the Digitalmars-d
mailing list