lua-users home
lua-l archive

what's wrong with this loop syntax?

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


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

AltStyle によって変換されたページ (->オリジナル) /