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))
   return string.sub(table.concat(tt), 2)

Doug Rogers - ICI - V:703.893.2007x220