RE: [sv-bc] Naming of unnamed sequential blocks

From: Steven Sharp <sharp_at_.....>
Date: Thu May 19 2005 - 12:38:43 PDT
Dave Rich wrote:
>An unnamed block does not create a scope based of my interpretation that
>the LRM specifically states that a "named block creates a new scope" and
>that backward compatibility with V2K is a given except if stated
>otherwise.

A variable declared in an unnamed block is visible to code inside that
block, but not to code outside that block.  A variable declared in an
unnamed block can have the same name as a variable declared in a scope
around the unnamed block, or in another unnamed block in the same scope
as this unnamed block. 

Clearly, an unnamed block with a variable declared in it creates a scope.
If it didn't, how would you explain the behavior described?  What scope do
you think that variable is in?

Steven Sharp
sharp@cadence.com
Received on Thu May 19 12:39:14 2005

This archive was generated by hypermail 2.1.8 : Thu May 19 2005 - 12:39:22 PDT