Dear Mike,
None of them, will be the value of the corresponding field of src (but not as in your example, see below).
The dash in the semantic meaning "no change" is allowed in value list notations where incomplete definitions are allowed. But this is not something like a "drag along" property, the dash has effect on the very assignment only it is used in, like in your foo example. Whatever was in that field/element of foo before the assignment, it remains the same after the assignment (even if the field/element was unbound).
Your second example is incorrect, as in parameters shall always be fully initialized. But, apart from this, the value of the field initialized to 42 in dst will get the value of the corresponding field in src; in the assignment dst := src; all actual values of all fields of src are assigned to the corresponding fields of dst, no matter how the actual parameter passed to src got those values.
BR, Gyorgy
>
Original Message
> From: active_ttcn3 : mts stf133 ttcn version 3 - active
> members only [This email address is being protected from spambots. You need JavaScript enabled to view it.] On Behalf Of Michael Sperber
> Sent: Sunday, 20 July, 2008 6:22 PM
> To: This email address is being protected from spambots. You need JavaScript enabled to view it.
> Subject: First-class status of "not-used"
>
> Is the "-" for "unchanged" only permissible in field-value or
> array expressions on the right-hand side of assignments? I
> only see this kind of stuff in the standard document:
>
> foo := { ..., -, ...}
>
> but never
>
> function f(in MyRecord src) ...
>
> ... f( { ..., -, ...} ) ...
>
> If the latter is permitted, what would the semantics of this:
>
> var MyRecord dst = { ..., 42, ...};
> dst := src;
>
> be, assuming it's in the body of f, and the 42 corresponds to
> the same field as the "-"? I.e. is the field in dst
> unchanged or undefined?
>
> --
> Regards,
> Mike
>