[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.3.0 (final) now available
- From: Dirk Laurie <dirk.laurie@...>
- Date: Wed, 14 Jan 2015 06:59:00 +0200
2015-01-14 2:06 GMT+02:00 Aapo Talvensaari <firstname.lastname@example.org>:
> One correction to docs:
> utf8.len docs say:
> "If it finds any invalid byte sequence, returns a false value plus the
> position of the first invalid byte."
> It actually seems to return nil (which is of course evaluated as false when
> not compared equality to false).
I.e. nil is "a false value" in just about every context, e.g. §3.4.5
"all logical operators consider both false and nil as false".
The manual also sometimes states "returns false", see e.g. `pcall`.
I'm willing to believe that the phrase "a false value" was in this case
chosen with hair-splitting exactness.