lua-users home
lua-l archive

Re: Auto-detecting whether script is stand-alone or module?

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


steve donovan <steve.j.donovan@gmail.com> writes:
> Something like:
> if arg[0]:match 'module%.lua$' then
> ... we are a program...
I presume you mean:
 if arg and type(arg) == 'table' and ...etc...
-miles
-- 
Dawn, n. When men of reason go to bed.

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