Unexpected Crash
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Apr 7 13:47:35 PDT 2016
On Thursday, 7 April 2016 at 20:42:17 UTC, default0 wrote:
> If I enter "5,5,5" on the commandline, hit enter, then enter
> "5,5,5"
When you hit enter, that puts a \n character in the buffer. readf
doesn't skip that automatically, so it complains upon hitting
that newline (the error message shows the character *after* it
though, which sucks).
But what you want to do is to read whitespace too. I think
putting a space in the format string at the beginning or end will
do it (I don't use readf often though).
More information about the Digitalmars-d-learn
mailing list