[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: file:read("*n") reference manual entry improvement
- From: Francisco Olarte <folarte@...>
- Date: Sat, 26 Oct 2013 19:55:08 +0200
Hi:
> Anyway, it seems we both agree the C documentation is quite convoluted
> about this topic. So, the question remains whether it is worth trying
> to explain something similar in the Lua manual, versus leaving it open
> to the user's imagination or own tests...
You are going to have a hard time explaining it. BTW, in more than 20
years I've never been able, in a real program, to read an input file
with fscanf in real code ( except private, internal files written with
fprintf and test programs ). I've always had to resort to read a line,
do some string processing, sscanf some chunks. And this was mainly due
to the uncertainity about the outcomes of scan errors (ok, sometimes I
did ftell, fscanf and fseek back to recover, but this is cheating ).
Francisco Olarte.