digitalmars.D.learn - simple question about function call syntax
- Nikolay (9/9) Aug 18 2014 I found this code sample in vibe:
- Dominikus Dittes Scherkl (3/12) Aug 18 2014 . is the module-scope. Use it to dis-ambiguate between a
- ketmar via Digitalmars-d-learn (5/7) Aug 18 2014 On Mon, 18 Aug 2014 16:30:12 +0000
- Nikolay (3/5) Aug 18 2014 Yes I found it. Correct link:
- ketmar via Digitalmars-d-learn (9/16) Aug 18 2014 On Tue, 19 Aug 2014 03:36:26 +0000
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)?
Aug 18 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.
Aug 18 2014
On Mon, 18 Aug 2014 16:30:12 +0000 Nikolay via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> wrote:What does mean ".connect"? Where I can find description of this=20 syntax (dot + function name)?right here: http://dlang.org/expression.html#PrimaryExpression language documentation rulez! ;-)
Aug 18 2014
right here: http://dlang.org/expression.html#PrimaryExpression language documentation rulez! ;-)Yes I found it. Correct link: Module Scope Operator http://dlang.org/module.html
Aug 18 2014
On Tue, 19 Aug 2014 03:36:26 +0000 Nikolay via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> wrote:my link is correct too. ;-) quote: .Identifier Identifier is looked up at module scope, rather than the current lexically nested scope. but your is better.right here: http://dlang.org/expression.html#PrimaryExpression language documentation rulez! ;-)Yes I found it. Correct link: =20 Module Scope Operator http://dlang.org/module.html
Aug 18 2014