Output contract's arguements

Peter Alexander peter.alexander.au at gmail.com
Thu Sep 19 07:31:43 PDT 2013


On Thursday, 19 September 2013 at 13:55:54 UTC, monarch_dodra 
wrote:
> I want to calculate the msb, and in the out contract, I want to 
> validate it is correct, by comparing it with what the input was.
>
> In this case, this doesn't really work, since the input was 
> "consumed".

Ok, so you need this v.old that I believe other languages have. I 
don't think re-using v to mean the previous value of it would be 
a good idea. It's useful sometimes to check the final value of v 
on function exit too.


More information about the Digitalmars-d mailing list