Hi Dave,
package p2; export p1::*; import p1:*; int y = x; // x is imported from 'p1'. endpackageSo then is 'x' exported, or nothing is exported? I think 'x' is allowed to be exported. Please confirm.
Regards Surya
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]OnBehalf 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 exportdeclaration?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 archive was generated by hypermail 2.1.8 : Sat Jan 10 2009 - 19:31:45 PST