lua-users home
lua-l archive

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


Chris Marrin wrote:

> Wow, that seems like a lot of work. Has anyone done a library to make
> any of this simpler?

Well, the meat of it is only a handful of lines of Lua. If you can live
without the flexibility of establishing your own types (a different
thread recently discussed), then it could be as simple as:

function types(args)
   local tt = {}
   table.foreachi(args, function(_,v)
                           table.insert(tt, ',' .. type(v))
                        end)
   return string.sub(table.concat(tt), 2)
end



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