Output contract's arguements
Peter Alexander
peter.alexander.au at gmail.com
Thu Sep 19 06:02:14 PDT 2013
On Thursday, 19 September 2013 at 12:45:01 UTC, Joseph Rushton
Wakeling wrote:
> On 19/09/13 14:19, Peter Alexander wrote:
>> You mean a separate copy from v?
>>
>> But surely then the copy would *always* be the same in the
>> in-contract as it is
>> in the out-contract? What's the point?
>
> It makes sense to be able to access v.old (or v.onEntry or
> whatever you want to call it) in the out contract, as then you
> could do some checks on the final value of v that are dependent
> on its entry value.
Yes that makes sense, but I have no idea what the difference
between the input and output contracts are in the original post.
What errors will the output v != 0 check catch that the input v
!= 0 test not catch if they both use the input value of v?
More information about the Digitalmars-d
mailing list