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

Reply via email to