[sv-ec] extern methods with default arg values

From: Neil Korpusik <Neil.Korpusik_at_.....>
Date: Fri Oct 03 2008 - 11:22:24 PDT
<forwarding email from stuart@sutherland-hdl.com -- the reflector ate it
  the first time through>

Note that sub clause 8.23 of draft 7 states:
"The out-of-block method declaration shall match the prototype declaration
exactly"

Does this mean that if a method argument has a default value assignment, the
default needs to be given in both the prototype and the full definition?
Does the default value have to be exactly the same in both places?

I'm asking because a method prototype in an interface appears to have a
different set of rules.  Subclause 25.7 states:
"If a default argument value is needed in a subrou-tine call, it shall be
specified in the prototype. If an argument has default values specified in
both the prototype and the declaration, the specified values need not be the
same, but the default value used shall be the one specified in the
prototype."

In an interface it is clear that the default arg value is in the prototype,
and is optional in the full definition, and that the value in the full
definition is ignored.

Stu
~~~~~~~~~~~~~~~~~~~~~~~~~
Stuart Sutherland
stuart@sutherland-hdl.com
+1-503-692-0898
www.sutherland-hdl.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Oct 3 11:23:29 2008

This archive was generated by hypermail 2.1.8 : Fri Oct 03 2008 - 11:25:49 PDT