lua-users home
lua-l archive

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


> 
> >> 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);..."
> 
> The explanation in parens seems absurd.  For it to make some sense, one
> would have to write "is a false condition" (namely unambiguously using
> "false" as an adjective rather than a noun, when the noun is used in a
> different meaning in the parenthetical remark), [...]

In the manual, both 'nil' and 'false' in the parentheses are in bold,
meaning the constants with those names, while the first 'false' is not,
meaning the regular adjective.


> [...] but it is probably
> easier to just write "when the value of its argument v is nil or false"
> in the first place.

The original wording emphasises that the criteria used by 'assert' is
the regular one used for falsity in Lua. The fact that falsity is
represented both by nil and false is only a remark, not an essencial
and distinguishing feature of 'assert'.

-- Roberto