It is already explicit in 12.3.1 "The return statement shall override any value assigned to the function name. When the return statement is used, nonvoid functions must specify an expression with the return." Dave > -----Original Message----- > From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On > Behalf Of Jonathan Bromley > Sent: Thursday, March 01, 2007 2:33 AM > To: Arturo Salz; sv-bc@server.eda-stds.org > Subject: RE: [sv-bc] Function return values > > Arturo, > > > The two mechanisms ought to be completely equivalent. Hence, a return > > statement must update the variable associated with the function name, > > just like the assignment form. > > I completely agree with you, and so do all the simulators I've tried. > However, I suggest that this should probably be explicit in the LRM. > > Also, given this behaviour, there is surely no reason to forbid > the form > return; > in a value-returning function; it should provide early exit with > the return value being whatever is in the function-name variable > at that time. > > Thanks > -- > Jonathan Bromley, Consultant > > DOULOS - Developing Design Know-how > VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services > > Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, > UK > Tel: +44 (0)1425 471223 Email: > jonathan.bromley@doulos.com > Fax: +44 (0)1425 471573 Web: > http://www.doulos.com > > The contents of this message may contain personal views which > are not the views of Doulos Ltd., unless specifically stated. > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu Mar 1 06:40:09 2007
This archive was generated by hypermail 2.1.8 : Thu Mar 01 2007 - 06:40:17 PST