lua-users home
lua-l archive

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



On 24/04/2014 15:13, Andrew Starks wrote:
On Thu, Apr 24, 2014 at 11:22 AM, Thiago L. <fakedme@gmail.com> wrote:
On 24/04/2014 12:41, steve donovan wrote:
On Thu, Apr 24, 2014 at 5:34 PM, Thiago L. <fakedme@gmail.com> wrote:
I think it should expand +inf to #str and -inf to 1 (= passing -#str to
the
function)...
Actually, on 2nd thought, I agree with Lukas - I also would expect
s:sub(inf) to be the empty string, seeing inf as the limit of
increasing integer value.

Although in practice - do bugs occur because of this?

Well something like what I said... I would actually expect str:sub(inf) to
expand to str:sub(#str+1) and str:sub(-inf,inf) to expand to
str:sub(0,#str+1)... or something...

This is a really basic question (maybe so much so as to be off-topic):

What is all of this useful for? Where do you guys come across this in real life?

-Andrew

Sets? :3