lua-users home
lua-l archive

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


>Right, I'm doing something similar to build "components". I can get 
>around it with
>an explicit return:
>
>  return {
>   "key1" = 25,
>   "key2" = function (a,b) ... end
>  }
>
>...but that return is a sticking point with the script coders, as it's 
>easy to
>forget and doesn't make sense in a config file.

How about writing something like

  DATA {
   "key1" = 25,
   "key2" = function (a,b) ... end
  }

where DATA should be a word that is meaningful to your script coders?

Of course, you'll have to code a function named DATA or whatever to do the
processing, but that's easy...
--lhf