lua-users home
lua-l archive

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


On Sat, Jun 25, 2011 at 12:19 PM, Lorenzo Donati
<lorenzodonatibz@interfree.it> wrote:

> I must nevertheless admit that the description for assert is slightly vague:
>
> "Issues an error when the value of its argument v is false (i.e., nil or
> false);..."
>
> I'll suggest to change it to:
>
> "Calls the function 'error' when the value of its argument v is false (i.e.,
> nil or false);..."
>
> So that one avoids being mislead to think that the error mechanism could be
> different from that of "error".

I'd like to see something there about the function being terminated.
Perhaps, embellishing your suggested text:

"Terminates the last protected function called and calls the function
'error' when the value of its argument v is false (i.e., nil or
false);..."

And perhaps add something like: "The most recent protected call will
contain the error and prevent it from propagating further."[1]

But please take into account that I don't know what I'm writing about. :-)

Best regards,

Paul

[1] Borrowed from K. Jung and A. Brown, Beginning Lua Programming
(2007), pg. 333.