help with c translation

Bill Baxter wbaxter at gmail.com
Thu Jul 2 09:18:15 PDT 2009


On Thu, Jul 2, 2009 at 9:07 AM, BCS<none at anon.com> wrote:
> Hello Ary,
>
>> Well, it should work! const means, once a value is assigned to that
>> variable, it never changes again. The compiler can do static analysis
>> to verify this. And that's why it works. And that's why D should also
>> work this way, IMHO.
>>
>
> In D1, const is truly const, as in never changes, ever, not even from one
> run of the program to another. D2 keeps this idea but IIRC calls it
> something else.

That's what D2 uses "enum" for.

--bb


More information about the Digitalmars-d-learn mailing list