www.digitalmars.com         C & C++   DMDScript  

D - Module-level accessibility

reply Sergey <smsmfk gmail.com> writes:
Hi, I'm a newcomer to D. Several days ago I've stumbled upon a very  
strange thing about D. As I understand, module members, such as classes,  
structs, functions and variables can be marked with an accessibility  
attribute, such as private, public, package or export. Say, there's a  
module named "test.d":

module test;

private int x1;
public int x2;

private void fnc1()
{
}
public void fnc2()
{
}

public class C1 {}
private class C2 {}

With a great surprise, I have discovered that from another module it is  
still possible to access both x1 and C1, though fnc1() is inaccessible !
Can anyone explain me what does it mean ?
Thanks in advance.
Oct 02 2010
parent HowardSmith <erickrausee outlook.com> writes:
For more details you should address 
https://www.writemyessay24h.net/ support representatives. They 
are working 24/7 to help users. Any questions or concerns should 
be discussed with them.
Dec 07 2017