lua-users home
lua-l archive

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


Rena <hyperhacker@gmail.com> writes:
>> local module_list = {
>>   require ("m"),
>>   require ("n"),
>>   require ("q"),
>> }
>> print (#module_list) -- The printed value will be "4"
>
> Nope. Only the first return value would be kept in a table constructor.

... except for the last value: if require 'q' returns multiple values,
they'll all be put into the table.

The real problem with returning multiple values from a module is that
"require" only returns one value, regardless of what the module does...

-miles

-- 
[|nurgle|]  ddt- demonic? so quake will have an evil kinda setting? one that
            will  make every christian in the world foamm at the mouth?
[iddt]      nurg, that's the goal