Bug in documentation or misunderstanding it?
    Suliman via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Thu Jan 26 10:47:21 PST 2017
    
    
  
On Thursday, 26 January 2017 at 18:42:29 UTC, Suliman wrote:
> On Thursday, 26 January 2017 at 17:52:24 UTC, H. S. Teoh wrote:
>> On Thu, Jan 26, 2017 at 05:38:59PM +0000, Suliman via 
>> Digitalmars-d-learn wrote:
>>> 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) ?
>>
>> Those are compile-time parameters. You specify them in a 
>> compile-time argument list using the !(...) construct, for 
>> example:
>>
>> 	auto lines = File("myfile.txt")
>> 		.byLine!(dchar, char)(Yes.keepTerminator, '\u263a');
>>
>>
>> T
>
> So I am right about others items about for example that `=` is 
> optional?
Why this code is work: `file.byLine(KeepTerminator.no, 'm')`
    
    
More information about the Digitalmars-d-learn
mailing list