[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: what's wrong with this loop syntax?
- From: john@...
- Date: Tue, 09 Jan 2007 12:21:31 +0300
>>>>> "MN" == Michael Newberry <mnewberry@mirametrics.com> writes:
MN> Pardon me for asking a simple question, but why can't I use this syntax?
MN> while (str = S:Next()) ~= nil do
MN> or this syntax:
MN> while (str = S:Next()) and str ~= nil do
MN> where S exists and S:Next() returns a string or nil.
MN> I get this message: `)' expected near `='
what about:
while (function() str = S:Next() return str end)() ~= nil do
?
--
Yours sincerely, Eugeny.
Doctor Web, Ltd. http://www.drweb.com