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 <m4gicks@gmail.com> wrote:

> > Semantics of Lua `not'?

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

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

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

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