lua-users home
lua-l archive

Re: representing structures in lua

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


On 2010年2月23日 11:24:57 -0500
cynthia powers <powcyn@gmail.com> wrote:
> Hi,
> How you write c-style structures in lua? The following does not appear to
> work: what am I missing? Any help/suggestions is appreciated.
> 
> _g_run_options =
> {
> log_dir = "mylog",
> group_dir =
> {
> [0] = ".../group"
> },
> print_precision = 4,
> print_preprocess_files =
> {
> [0] = "TREE",
> "CELL"
> },
> xcount = "false",
> fprofile = "true",
> fprofile_count = 20,
> gstats = "true",
> dstats = "true",
> uppercase = "false",
> prefix = "",
> opt= "false"
> }
Works by me as well:
print (_g_run_options.xcount, _g_run_options.group_dir[0])
--> false	.../group
(even if spacing / indent is a bit chaotic... ;-)
Denis
________________________________
la vita e estrany
http://spir.wikidot.com/

AltStyle によって変換されたページ (->オリジナル) /