lua-users home
lua-l archive

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

On Sat, 28 May 2022 00:21:27 +0100
Marcus Mason <> wrote:

> > Semantics of Lua `not'?

> Some examples of how `not` works:
>        not 1 -- this is false

I got the not' conditional from
Lua Performance Tips by Roberto Ierusalimschy

A “smart” alternative would be this loop:
while true do
local k = next(t)
if not k then break end
t[k] = nil

I tried in that "99 bottles" script, but I keep getting a run-away.
** Bottom-posting, text-only is the netiquette way! **