[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: help about pattern-matching
- From: Dirk Laurie <dpl@...>
- Date: Wed, 8 Jun 2011 11:48:01 +0200
On Wed, Jun 08, 2011 at 11:31:56AM +0200, Alexander Gladysh wrote:
> On Wed, Jun 8, 2011 at 13:28, Miles Bader <miles@gnu.org> wrote:
> > Dirk Laurie <dpl@sun.ac.za> writes:
> >> That bothered me too, but I couldn't work out how to save a variable
> >> number of return values in Lua 5.1. It's easy in 5.2 where you have
> >> table.pack.
> >
> > local rvals = { return_multiple_values() }
>
> > ?
>
> No. Because you have to handle nils in the middle.
>
In the restricted context of saving the output from string.match,
Miles's solution is good enough. Thanks.
Dirk
- References:
- help about pattern-matching, Igor Medeiros
- Re: help about pattern-matching, Dirk Laurie
- Re: help about pattern-matching, Igor Medeiros
- Re: help about pattern-matching, Igor Medeiros
- Re: help about pattern-matching, steve donovan
- Re: help about pattern-matching, Dirk Laurie
- Re: help about pattern-matching, liam mail
- Re: help about pattern-matching, Dirk Laurie
- Re: help about pattern-matching, Miles Bader
- Re: help about pattern-matching, Alexander Gladysh