lua-users home
lua-l archive

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


Doug Rogers wrote:

> print(s:len())
stdin:1: attempt to index global `s' (a string value)
stack traceback:
       stdin:1: in main chunk
       [C]: ?


Well, I understand why this is the way it is - the colon notation tries to index the table 's', but 's' is not a table. What I'm looking for is a change in the parser so that it will use the global table (or string, or ...) if 's' is not a table.

Doug

--
--__-__-____------_--_-_-_-___-___-____-_--_-___--____
Doug Rogers - ICI - V:703.893.2007x220 www.innocon.com
-_-_--_------____-_-_-___-_--___-_-___-_-_---_--_-__-_