Following up from the reddit announcement

Ali Çehreli acehreli at yahoo.com
Mon Feb 24 15:25:25 PST 2014


On 02/24/2014 02:15 PM, Steven Schveighoffer wrote:

> if(readf("%s\n", &input) == 0)
>              break;
>
> And it works fine. Note I had to add \n to the readf to use a
> one-number-per-line style (didn't make sense otherwise).

I always put a space before the format specifier to ignore all whitespace:

         if (readf(" %s", &input) == 0)

Ali



More information about the Digitalmars-d mailing list