Re: what's wrong with this loop syntax?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: what's wrong with this loop syntax?
- From: "Rafael de Menezes" <soscpd@...>
- Date: Mon, 8 Jan 2007 18:47:26 -0200
Just
while (str) do
if str = S:Next() then
end
end
doesnt work? Its not the beeest est code, but i dont have more sources....
----- Original Message -----
From: "Michael Newberry" <mnewberry@mirametrics.com>
To: "Lua list" <lua@bazar2.conectiva.com.br>
Sent: Monday, January 08, 2007 6:33 PM
Subject: what's wrong with this loop syntax?
Pardon me for asking a simple question, but why can't I use this syntax?
while (str = S:Next()) ~= nil do
or this syntax:
while (str = S:Next()) and str ~= nil do
where S exists and S:Next() returns a string or nil.
I get this message: `)' expected near `='
Thanks,
Michael