Hi Surya: There are actually now multiple ways of achieving the following capability: > It can be useful to assign a value to a local variable within an > instance of a named sequence and reference the<br> > local variable in the instantiating context at or after the completion > of a match of the instance. This capability<br> > is supported under the following conditions:<br> The older way is the second one mentioned by you. The older way was introduced before typed arguments existed. The newer way uses the typed local variable arguments of direction inout or output and is the first way mentioned by you. These two ways are not meant to be in conflict with or exclusive of one another. Best regards, John H. > X-eda.org-MailScanner-Watermark: 1231175482.51298@cgP4UAN2AQUUGjdk9q+sSA > X-Authentication-Warning: server.eda.org: majordom set sender to owner-sv-ac@eda.org using -f > X-eda.org-MailScanner-Watermark: 1231175461.21988@HZrOO/3my85f4UuGo0doTQ > Date: Mon, 29 Dec 2008 22:40:35 +0530 > From: Surya Pratik Saha <spsaha@cal.interrasystems.com> > X-InterraSystems-MailScanner-Information: Please contact the ISP for more information > X-InterraSystems-MailScanner: Found to be clean > X-InterraSystems-MailScanner-From: spsaha@cal.interrasystems.com > X-Spam-Status: No, No, No > X-eda.org-MailScanner: Found to be clean, Found to be clean > Sender: owner-sv-ac@eda.org > X-eda.org-MailScanner-Information: Please contact the ISP for more information > X-MailScanner-ID: mBTHBJrN023638 > X-eda.org-MailScanner-From: owner-sv-ac@server.eda.org > X-OriginalArrivalTime: 29 Dec 2008 17:13:02.0237 (UTC) FILETIME=[B4B4CCD0:01C969D8] > > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> > <html> > <head> > </head> > <body bgcolor="#ffffff" text="#000000"> > Hi,<br> > I did not get any answer of last mail. So I am resending it:<br> > <br> > In SV 2009 draft LRM, there is an example:<br> > sequence sub_seq2(local inout int lv);<br> > (a ##1 !a, lv += data_in)<br> > ##1 !b[*0:$] ##1 b && (data_out == lv);<br> > endsequence<br> > sequence seq2;<br> > int v1;<br> > (c, v1 = data)<br> > ##1 sub_seq2(v1) // lv is initialized by assigning it the value of v1;<br> > // when the instance sub_seq2(v1) matches, v1 is<br> > // assigned the value of lv<br> > ##1 (do1 == v1);<br> > endsequence<br> > <br> > And later it is mentioned:<br> > It can be useful to assign a value to a local variable within an > instance of a named sequence and reference the<br> > local variable in the instantiating context at or after the completion > of a match of the instance. This capability<br> > is supported under the following conditions:<br> > — The local variable shall be declared outside the named sequence, and > its scope shall include both the<br> > instance of the named sequence and the desired reference in the > instantiating context.<br> > — The local variable shall be passed as an entire actual argument in > the list of arguments of the<br> > instance of the named sequence.<br> > — <b>The corresponding formal argument shall be untyped.</b><br> > <br> > Whereas, in the example corresponding formal argument 'lv' is not > untyped for local variable 'v1'. Am I missing anything?<br> > <pre class="moz-signature" cols="72">-- > Regards > Surya > </pre> > <br> > -- <br> > This message has been scanned for viruses and > <br> > dangerous content by > MailScanner, and is > <br> > believed to be clean. > -- > <pre>This email was Anti Virus checked by Astaro Security Gateway. <a class="moz-txt-link-freetext" href="http://www.astaro.com">http://www.astaro.com</a></pre> > </body> > <br />-- > <br />This message has been scanned for viruses and > <br />dangerous content by > MailScanner, and is > <br />believed to be clean. > </html> > > -- > <pre>This email was Anti Virus checked by Astaro Security Gateway. http://www.astaro.com</pre> -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Sun Jan 4 14:40:30 2009
This archive was generated by hypermail 2.1.8 : Sun Jan 04 2009 - 14:41:28 PST