formattedRead and whitespace-separated variables
Ali Çehreli
acehreli at yahoo.com
Tue Apr 9 10:09:18 PDT 2013
On 04/09/2013 04:42 AM, Joseph Rushton Wakeling wrote:> Hello all,
> formattedRead(s, "%s %s %s", &var1, &var2, &var3);
>
> ... but is this tolerant of arbitrary differences in the whitespace
between
> variables? (e.g. it might be 2 spaces not 1; or a tab; or ...)
Yes it is tolerant. A single space in the format strings reads and
ignores all white space at that spot.
I suggest you put a space before the first %s as well.
Ali
More information about the Digitalmars-d-learn
mailing list