Simple code that won't compile

ginophi ginophi at fjw3n90v.com
Sat Jul 7 13:15:01 PDT 2007


Thanks I'll check that out


"Deewiant" <deewiant.doesnotlike.spam at gmail.com> wrote in message
news:f6orl6$tm2$1 at digitalmars.com...
> ginophi wrote:
> > Thanks for the quick reply. But I forgot to put a 'final' in there. Why
> > would it work with 'const int b = 1;' and not 'final int b = 1;' ?
> >
>
> Because D isn't Java.
>
> In D 1.0, which is what you should be using, final only has a meaning
regarding
> classes and inheritance. See "Virtual Functions" at
> http://www.digitalmars.com/d/1.0/function.html and "Final Classes" at
> http://www.digitalmars.com/d/1.0/class.html
>
> If you care about the beta 2.0, see
> http://www.digitalmars.com/d/final-const-invariant.html
>
> -- 
> Remove ".doesnotlike.spam" from the mail address.




More information about the Digitalmars-d-learn mailing list