Re: [sv-bc] Questions on export statemet

From: Surya Pratik Saha <spsaha_at_.....>
Date: Sat Jan 10 2009 - 19:30:31 PST
Hi Dave,
Ok, if I change the design in the following way:
package p2;
    export p1::*;
    import p1:*;
    int y = x; // x is imported from 'p1'.
endpackage
So then is 'x' exported, or nothing is exported? I think 'x' is allowed to be exported. Please confirm.
Regards
Surya


-------- Original Message  --------
Subject: Re:[sv-bc] Questions on export statemet
From: Rich, Dave <Dave_Rich@mentor.com>
To: Surya Pratik Saha <spsaha@cal.interrasystems.com>, sv-bc@eda.org <sv-bc@eda.org>
Date: Sunday, January 11, 2009 3:14:41 AM
Hi Surya,

The LRM says explicitly: "A package export may precede a corresponding
package import."

Note that in your example, nothing is exported because nothing is
imported. Each identifier to be exported must appear at least once in
the package. That appearance must cause the actual import.


Dave

  
-----Original Message-----
From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org]
    
On
  
Behalf Of Surya Pratik Saha
Sent: Saturday, January 10, 2009 6:14 AM
To: sv-bc@eda.org
Subject: [sv-bc] Questions on export statemet

Hi,
For export of 'package_name::*' form, is it required any 'import
package_name::*' to be declared lexically before the export
    
declaration?
  
Or is the following example legal?

package p2;
    export p1::*;
    import p1:*;
endpackage

I can understand for export of 'package_name::name', some import
declaration has to be present before that, otherwise it is illegal.

Please let me know.

--
Regards
Surya




--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


--
This email was Anti Virus checked by Astaro Security Gateway.
http://www.astaro.com
    




  


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean. Received on Sat Jan 10 19:31:34 2009

This archive was generated by hypermail 2.1.8 : Sat Jan 10 2009 - 19:31:45 PST