Output contract's arguements

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Thu Sep 19 05:07:09 PDT 2013


On 19/09/13 12:44, monarch_dodra wrote:
> If the function has already exited, then why is the state of he arguments
> modified? I though pass by value meant that the function operated on its own copy?

I don't see what else makes sense.  v is a local mutable value that only has 
sense inside the function, and the only way it makes sense for the out contract 
to interact with it is to check on its final state to make sure it hasn't taken 
on an insane value.

It's redundant to check its initial state because you can already do that with 
the in contract.


More information about the Digitalmars-d mailing list