Bresticker, Shalom wrote: > I'll ask a reverse question. > > Is it legal to assign a value to the function variable within a > void function? No. > If so, what is the variable's type? > Is it legal to hierarchically access the function variable of a void > function? No. > Is it legal to have a return statement with a value within a void function? No. The LRM isn't clear of course, but since one can't declare a variable of type "void" it would be a huge stretch to think that the answer to any of these questions would be "yes". Gord. > And in any function, does a return statement with a value assign that > value to the function variable? The LRM implies not, but does not say so > explicitly. > > Thanks, > Shalom > > ------------------------------------------------------------------------ > *From:* owner-sv-ec@server.eda.org > [mailto:owner-sv-ec@server.eda.org] *On Behalf Of *Surya Pratik Saha > *Sent:* Tuesday, January 15, 2008 12:30 PM > *To:* sv-bc@server.eda.org; sv-ec@server.eda.org > *Subject:* [sv-ec] Is void function not implicitly declared inside > the function > > Hi, > As per V2K LRM (10.4.2 Returning a value from a function): > *The function definition shall implicitly declare a variable, > internal to the function, with the same name as the function. > > *Is it changed when the function is declared with void return type? > Is the following case legal? > > module a; > function void fnc; > input x; > //integer fnc; > fnc : assert(0 == 1); > endfunction > endmodule > > Some simulators pass if the function is declared inside class only. > I did not see anything mentioned in SV LRM. > > -- > Regards > Surya > > > -- > This message has been scanned for viruses and > dangerous content by *MailScanner* <http://www.mailscanner.info/>*, > and is > believed to be clean. * > > *--------------------------------------------------------------------- > Intel Israel (74) Limited > > This e-mail and any attachments may contain confidential material for > the sole use of the intended recipient(s). Any review or distribution > by others is strictly prohibited. If you are not the intended > recipient, please contact the sender and delete all copies. > * > > * > -- > This message has been scanned for viruses and > dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is > believed to be clean. * -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Tue Jan 15 08:15:09 2008
This archive was generated by hypermail 2.1.8 : Tue Jan 15 2008 - 08:15:21 PST