CT usage only in executable
    Simen kjaeraas 
    simen.kjaras at gmail.com
       
    Fri Jul 16 23:39:07 PDT 2010
    
    
  
Daniel Murphy <yebblies at nospamgmail.com> wrote:
> Sorry, I don't have D1 installed.  Can you use enum to declare manifest
> constants in D1 or is it a D2 thing?
It's a D2 thing. I believe the D1 way to do it is with static const.
> If the string is left in the executable from
>
> const char[] CT_STRING = "blah blah";
> void main () {}
>
> then I think this is a bug/enhancement for the linker.
Enhancement, I'd say. And yes, DMD does that. It's the reason for
the enum manifest constants in D2.
-- 
Simen
    
    
More information about the Digitalmars-d-learn
mailing list