RE: [sv-bc] Importing a enum from a package don't import enum variable??

From: Arturo Salz <Arturo.Salz_at_.....>
Date: Fri Mar 09 2007 - 10:30:22 PST
Adam,

I agree that importing all items in the package is the safest scheme.
Unfortunately, to do that, users must explicitly import every item using
something like:
	import pack::item_1;
	import pack::item_2;
	...
	import pack::item_N;
This is because the wildcard syntax does not guarantee that all items
declared in the package will be imported; if any one of the package
identifiers is declared in the importing scope (or explicitly imported
from another package) the corresponding item is silently not imported.
I've always felt that the wildcard mechanism is fragile, but not enough
people in the committee agree with this. BTW, I recommend explicitly
using the fully qualified name (including the package name) in the code.
That may be more verbose but avoids any confusion.

	Arturo

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Adam
Krolnik
Sent: Friday, March 09, 2007 5:27 AM
To: Bresticker, Shalom; Sonjoy Mondal; sv-bc@eda.org
Subject: RE: [sv-bc] Importing a enum from a package don't import enum
variable??


Along these lines...

When is it not good to import all items in the file ?
Or inversely, when should you only import specific items ?

Seems that importing all elements of a package is what one should be
doing in general.

   Thanks.



--------- Original Message --------
From: Bresticker, Shalom <shalom.bresticker@intel.com>
To: Sonjoy Mondal <sonjoy@cal.interrasystems.com>, sv-bc@server.eda.org
Subject: RE: [sv-bc] Importing a enum  from a package don't import enum
variable??
Date: 03/09/2007 04:29

> Both are correct.
> 
> The difference is that the scope of the structure member names is only
> with the structure, whereas the scope of enum value names is the
entity
> in which the enum is declared.
> 
> Shalom
> 
> &gt; -----Original Message-----
> &gt; From: owner-sv-bc@server.eda.org
[mailto:owner-sv-bc@server.eda.org]
> &gt; On Behalf Of Sonjoy Mondal
> &gt; Sent: Friday, March 09, 2007 1:36 PM
> &gt; To: sv-bc@server.eda.org
> &gt; Subject: [sv-bc] Importing a enum from a package don't import
enum
> &gt; variable??
> &gt; 
> &gt; Hi,
> &gt; 
> &gt; can you Please let me know that if an enum is defined in a
package
> &gt; then
> &gt; while importing the enum from that package in a module,the enum
> &gt; variable
> &gt; should also be imported or not. According to LRM P1800.2005
section
> &gt; 19.2.2 it seems as it bug of LRM itself as it is showing that
> &gt; importing a
> &gt; enum does not import the enum variable while for other like
structure,
> &gt; importing a structure import the structure member also so it
seems as
> &gt; it
> &gt; is  bug of LRM .
> &gt;  so can you please let me know which one is correct.
> &gt; 
> &gt; Thanks,
> &gt; Dhiraj
> &gt; 
> &gt; 
> &gt; 
> &gt; --
> &gt; This message has been scanned for viruses and
> &gt; dangerous content by MailScanner, and is
> &gt; believed to be clean.
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> 
> .


_________________________________________________________
Message sent using Winmail Mail Server

-- This message has been scanned for viruses anddangerous content by
MailScanner, and isbelieved to be clean.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Mar 9 10:30:42 2007

This archive was generated by hypermail 2.1.8 : Fri Mar 09 2007 - 10:30:57 PST