[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Modules, interfaces
- From: Miles Bader <miles@...>
- Date: Wed, 11 Apr 2012 10:50:21 +0900
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
- References:
- Modules, interafaces, Jorge
- Re: Modules, interafaces, Rebel Neurofog
- Re: Modules, interfaces, Jorge
- Re: Modules, interfaces, Rebel Neurofog
- Re: Modules, interfaces, Rena