I just got it! (invariant/const)
Janice Caron
caron800 at googlemail.com
Wed Apr 9 08:03:03 PDT 2008
On 09/04/2008, Janice Caron <caron800 at googlemail.com> wrote:
> > int f(invariant D) invariant { ... } //omitting pure here for now
> >
> > What does that mean?
>
> Nothing. It's not legal D.
My apologies. Of course it's legal. I was misreading. (Although you
did miss out the variable name for D. Let's call it d)
So it means that "this" is invariant, and that d is invariant.
> Also not legal D. Although the following would be
Also I screwed up. Yes, that is legal D. My apologies again. It means
as above, plus the function is also pure.
More information about the Digitalmars-d
mailing list