lua-users home
lua-l archive

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


>>>>> "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