[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: require() parse error in 5.3.4/5.4.0-work2?
- From: Andrew Gierth <andrew@...>
- Date: Tue, 26 Jun 2018 13:15:49 +0100
>>>>> "Francisco" == Francisco Olarte <firstname.lastname@example.org> writes:
Francisco> Also, note checking for them in lua is difficult ( i.e., in
Francisco> f(a,b) is not easy to differentiate a call as f(1,nil) from
Francisco> f(1) , or f(1,2, nil) from f(1,2) ( I only know how to do it
Francisco> for the first case if I just declare f(...) or f(a,b,...)
Francisco> for the second and check table.unpack(...).n,
select('#', ...) is the official way to get the number of items in ...
if you don't otherwise need to table.pack it. (It's kind of irritating
that this takes a function call to do.)