[sv-bc] Scope of function formal

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Thu Jul 20 2006 - 18:04:43 PDT
Are the following code snippets equivalent?

 

// snippet 1

     int x;

     function type(x) foo( var byte x, var type(x) y = $bits(x) );

        ...

 

// snippet 2

     int x;

     function int foo( byte x, y = 8 );

        ...

 

Also, is it legal to write the following?

 

        function var type(x) foo( ... );

 

According to the BNF of A.2.6, it is not.  But that may be an erratum.

 

-- Brad

 

 

 
Received on Thu Jul 20 18:04:55 2006

This archive was generated by hypermail 2.1.8 : Thu Jul 20 2006 - 18:05:09 PDT