Function with same name as a module name

Daniel Kozak via Digitalmars-d digitalmars-d at puremagic.com
Mon Dec 1 12:29:37 PST 2014


Dne Mon, 01 Dec 2014 18:10:35 +0100 Jeremy DeHaan via Digitalmars-d  
<digitalmars-d at puremagic.com> napsal(a):

> I don't think you can specify look ups with the name of the module in  
> the same module like you can with imported ones. If you want to specify  
> that it is a variable in module scope, use the module scope operator.
>
> writeln(.a); // the leading '.' specifies module scope

You can. It doesn't work only when there is a another symbol with same  
name as a module. But it makes a sense.


More information about the Digitalmars-d mailing list