The paragraph just above 16.11
The value of a local variable that flows out of the composite sequence is
the latest assigned value.
The threads for the two operands are merged into one at completion of
evaluation of the composite
sequence.
sequence s7;
int x,y;
*((a ##1 (b, x = data, y = data1) ##1 c)*
and *(d ##1 (`true, x = data) ##0 (e==x)))* ##1 (x==data2);
*// illegal because x is common to both threads*
endsequence
sequence s8;
int x,y;
*(a ##1 (b, x = data, y = data1) ##1 c)*
and *(d ##1 (`true, x = data) ##0 (e==x)))* ##1 (y==data2);
*// legal because y is in the difference*
endsequence
[Ben] But in this case, * x is also common to both threads*
*Thus, why is this legal? *
*LRM states:*
*
d) In the case of and and intersect, a local variable that flows out of at
least one operand shall flow
out of the composite sequence unless it is blocked. A local variable is
blocked from flowing out of
the composite sequence if either of the following statements applies:
1) The local variable is assigned in and flows out of each operand of the
composite sequence,
*
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Aug 2 21:12:24 2010
This archive was generated by hypermail 2.1.8 : Mon Aug 02 2010 - 21:12:31 PDT