lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 25. okt. 2013 10:28, Roberto Ierusalimschy wrote:
Mmmh, I did some investigations and I'm not completely sure it is a bug,
although the C89 standard is *really* murky on the subject. According to
the standard (a draft document I found long ago on the Internet whose
number is not specified, I hope you have a copy of the actual C89
standard to check my references):
I have a copy of C99...

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...

-- Roberto



I would suggest a note that file:read("*n") (being based on based on C function fscanf) is not recommended unless it is certain that the stream return a valid textual number.

Egil