[sv-bc] task/function inout arguments with default values

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Sun Sep 17 2006 - 06:44:26 PDT
  

Task/function inout arguments are copy in at beginning and out at end.

inouts may also have defaults.

The text says (12.4.3), "The default_value is an expression. The
expression is evaluated in the scope containing the subroutine
declaration each time a call using the default is made." and "When the
subroutine is called, arguments with default values can be omitted from
the call, and the compiler shall insert their corresponding values."

This does not seem quite correct for inouts. For inouts, the actual
argument needs to be an expression which is valid on the left-hand side
of a procedural assignment (1364-2005, 10.2.2).

So when using a default for an inout, the compiler needs to insert the
expression itself, not just its value.

Also, the text should note that in the case of an inout, the
default_value needs to be an expression which would be valid as an
actual argument to the inout.

Shalom

 

 

 

Shalom Bresticker

Intel Jerusalem LAD DA

+972 2 589-6852

+972 54 721-1033

I don't represent Intel 

 



image001.gif
Received on Sun Sep 17 06:44:55 2006

This archive was generated by hypermail 2.1.8 : Sun Sep 17 2006 - 06:45:15 PDT