Bug in documentation or misunderstanding it?

Suliman via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jan 26 09:38:59 PST 2017


I read docs and can't understand what's wrong. Or I am do not 
understand it, or there is come mistake.

Let's look at function 
https://dlang.org/phobos/std_stdio.html#.File.byLine

auto byLine(Terminator = char, Char = char)(KeepTerminator 
keepTerminator = No.keepTerminator, Terminator terminator = 
'\x0a')

what does mean first groups of scope: (Terminator = char, Char = 
char) ?

The second one as I understand it's options symbol `=` mean that 
there is some default values, so if I will call function I can do 
not set them, so predefined values will be used.

Am I right? And If I do not want predefined I can pass my own 
like:
`byLine(No.keepTerminator, 'SomeLetter')`

for example: `file.byLine(No.keepTerminator, 'a')`

But when I compile simple example I am getting compilation error: 
`undefined identifier 'No'`

Where I am wrong?




More information about the Digitalmars-d-learn mailing list