digitalmars.D - Protection package and export
- Luca (5/5) Jan 03 2008 Hello, I known that there are 4 type of protection for the Fields and me...
- Derek Parnell (14/20) Jan 03 2008 Well actually in D the meanings above are not quite accurate. In D the
Hello, I known that there are 4 type of protection for the Fields and methods of the class: private: Accessible only by functions of the class public: Accessible also from the rest of the program But I do not know the meanings of package and export, someone knows this?? Thanks
Jan 03 2008
On Thu, 03 Jan 2008 10:18:27 -0500, Luca wrote:Hello, I known that there are 4 type of protection for the Fields and methods of the class: private: Accessible only by functions of the class public: Accessible also from the rest of the program But I do not know the meanings of package and export, someone knows this??Well actually in D the meanings above are not quite accurate. In D the meanings are ... Private: Accessible to code in the same module. Protected: Accessible to code in the same module and from classes derived from the protected class. (Only applies to classes). Public: Accessible to code in any module. Package: Accessible to code in any module within the same package, which means in the same directory. Export: Accessible to code in other applications. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell
Jan 03 2008