On Sunday, 28 May 2017 at 22:14:46 UTC, Adam D. Ruppe wrote:
On Sunday, 28 May 2017 at 22:07:12 UTC, helxi wrote:
So I tried using C's EOF but the types aren't compatible since
EOF is probably aliased to -1
The readln docs for D say it returns null on end of file. The
example given is:
import std.stdio;
void main()
{
string line;
while ((line = readln()) !is null)
write(line);
}
http://dpldocs.info/experimental-docs/std.stdio.readln.1.html
I would try that.
Oh yes, fantastic,
I also seem to have forgotten EOF was meant to compare chars, not
strings.