lua-users home
lua-l archive

[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