simple question about function call syntax

Dominikus Dittes Scherkl via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Aug 18 09:33:04 PDT 2014


On Monday, 18 August 2014 at 16:30:13 UTC, Nikolay wrote:
> I found this code sample in vibe:
>
> void connect(NetworkAddress addr)
> 	{
> 		enforce(.connect(m_ctx.socketfd, addr.sockAddr, 
> addr.sockAddrLen) == 0, "Failed to connect UDP 
> socket."~to!string(getLastSocketError()));
> 	}
>
> What does mean ".connect"? Where I can find description of this 
> syntax (dot + function name)?

. is the module-scope. Use it to dis-ambiguate between a 
module-global symbol and a function local symbol with same name.


More information about the Digitalmars-d-learn mailing list