Output contract's arguements

Peter Alexander peter.alexander.au at gmail.com
Thu Sep 19 05:19:20 PDT 2013


On Thursday, 19 September 2013 at 11:18:54 UTC, monarch_dodra 
wrote:
> On Thursday, 19 September 2013 at 11:11:58 UTC, Peter Alexander 
> wrote:
>> On Thursday, 19 September 2013 at 11:07:07 UTC, Artur Skawina
>>> That "final value of v" is not part of any contract, it's 
>>> just a private
>>> local.
>>
>> I repeat my question then: what would you want this to do? As 
>> you say, v is a local copy, it cannot be part of a contract -- 
>> it cannot affect anything the client code sees.
>
> I'd like the out contract to operate on its own copies of the 
> function's arguments.
>
> These could either be passed by the implementation of the body, 
> prior to starting proper, or by the caller, passing the same 
> arguments to both the contract and the function. That'd be 
> dependent on the implementation.

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?


More information about the Digitalmars-d mailing list