Shalom, It needs to be that way because of static (fixed) type and name binding. The compiler needs a fixed target when it compiles the subroutine declaration, especially if the default is an expression of identifiers. Dave ________________________________ From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On Behalf Of Bresticker, Shalom Sent: Tuesday, July 31, 2007 6:35 AM To: sv-bc Subject: [sv-bc] subroutine argument default question Hi, Subroutine defaults are evaluated in the scope containing the subroutine declaration, not the subroutine call. I think property and sequence defaults work the same way. How important is that? Why could not the default be evaluated as though the call were written with the default expression explicitly appearing in the subroutine call? How important is the back-compatibility issue? If for example, the default expression were a[i], the variable pointed to would change from call to call anyway, depending on the value of I, and defaults do not have to be constant expressions. Thanks, Shalom Shalom Bresticker Intel Jerusalem LAD DA +972 2 589-6852 +972 54 721-1033 -- This message has been scanned for viruses and dangerous content by MailScanner <http://www.mailscanner.info/> , 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 Tue Jul 31 08:19:27 2007
This archive was generated by hypermail 2.1.8 : Tue Jul 31 2007 - 08:19:48 PDT