lua-users home
lua-l archive

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


While the current behavior may seem unintuitive at first sight, I think it is very sane. A function can return 0, 1 or multiple values even in the same function. I often return an error status as first value and if that indicates success, more values can follow. Without the current behavior, the parameter assignment to a printf() style function would change at runtime depending on the outcome of the function call and that would be much more confusing and error prone than this clear and comprehensive behavior.

Rolf Kalbermatter