strip() and formattedRead()

realhet real_het at hotmail.com
Wed Mar 21 19:25:07 UTC 2018


On Wednesday, 21 March 2018 at 18:50:18 UTC, Adam D. Ruppe wrote:
> On Wednesday, 21 March 2018 at 18:44:12 UTC, realhet wrote:
>> Compiling this I get an error: "formattedRead: cannot deduce 
>> arguments from (string, string, float, float, float)"
>
> What compiler version are you using? The newest versions allow 
> this code, though the old ones require an intermediate variable 
> to satisfy the `ref` requirement on formattedRead (it will want 
> to update that variable to advance it past the characters it 
> read).
>
> so either update your version, or just give an and use an 
> intermediate:
>
> string s = "xxxx".strip;
> formattedRead(s, ....)

Thank both of You! You guys are super helpful. (I'm learning from 
Ali's book and after these instant answers I was like: "I'm not 
worthy" :D)

So I had v2077.1 previously, now I've installed 2079.0 and it all 
works great.




More information about the Digitalmars-d-learn mailing list