Re: strip() and formattedRead()

2018-03-21 Thread realhet via Digitalmars-d-learn
string s = "".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.

Re: strip() and formattedRead()

2018-03-21 Thread Adam D. Ruppe via Digitalmars-d-learn
termediate 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 = "".strip; formattedRead(s, )

Re: strip() and formattedRead()

2018-03-21 Thread Ali Çehreli via Digitalmars-d-learn
which rvalues cannot be passed for. Make the source an lvalue (i.e. a proper variable): auto source = "vertex -5.1 2.4 3.666".strip; if(formattedRead(source, "vertex %f %f %f", x, y, z)){ Ali

strip() and formattedRead()

2018-03-21 Thread realhet via Digitalmars-d-learn
Hi, I just got this problem and since an hour can't find answer to it. float x,y,z; if(formattedRead("vertex -5.1 2.4 3.666".strip, "vertex %f %f %f", x, y, z)){ writefln("v(%f, %f, %f)", x, y, z); } Compiling this I get an error: "formattedRead: cannot deduce arguments from