lua-users home
lua-l archive

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

On 05/01/2016 20:14, Roberto Ierusalimschy wrote:
I just realized that the manual doesn't say much about the return
value of file:close for handles created by regular


IMHO the manual should mention at least briefly what those methods
return in general. What do you think?

The manual says this:

   Unless otherwise stated, all I/O functions return nil on failure (plus
   an error message as a second result and a system-dependent error code
   as a third result) and some value different from nil on success.


What else could it say?

-- Roberto

Ouch! That is embarrassing!  =(8-O

I completely overlooked it!
I was sure I read it before (multiple times!), but skimming the manual over and over didn't help today (OMG!).
That's really selective blindness in action!

To my partial defense, I've been rereading the manual over and over for the last two weeks, since I'm preparing some selected documentation for an introductory one-week (10 hours) crash course on Lua for high-achieving students of my school that I will teach beginning next week.

A note to myself: stop reading when your eyes start bleeding!

Sorry for the noise!

-- Lorenzo