module specification for variables

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Feb 4 04:26:31 PST 2017


On Saturday, 4 February 2017 at 09:31:57 UTC, Profile Anaysis 
wrote:

> module x;
>
> special int X;  // special = some keyword that makes this work 
> as I intend. e.g., "no_import int X;"
>
>
> module y;
>
> void main()
> {
>     import x;
>     x.X = 3;
>     // X = 3; fails.
> }
>

extern(C) int X;


More information about the Digitalmars-d-learn mailing list