April 16, 2014
On Wednesday, 16 April 2014 at 18:46:18 UTC, Ali Çehreli wrote:
> On 04/16/2014 11:36 AM, FreeSlave wrote:
>> Note that readf is not equivalent to scanf since readf does not skip
>> spaces and newline character. Input must completely match format.
>
> Just like in scanf, a single space character is sufficient to consume zero or more whitespace characters.
>
> Ali

My mistake. I thought spaces are counted precisely (or maybe it's old behavior). But you still should add \n at the end of format to avoid format exceptions. That does not make sense for console input since every input ended with Enter, which makes newline anyway.
April 16, 2014
It also throws if you input initial or trailing spaces and there are no spaces at the start or end of format string (scanf skips these spaces)
April 16, 2014
Thanks everyone for figuring everything out!
1 2
Next ›   Last »