lua-users home
lua-l archive

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


> On Fri, Sep 28, 2012 at 9:38 PM, David Collier <myshkin@cix.co.uk> wrote:
> > In http://www.lua.org/pil/20.html
> >
> > I see "A program can create string literals and concatenate them. But it
> > cannot extract a substring, check its size, or examine its contents"
> >
> > and yet if I have
> >
> > s="123"
> > print( #s )
> >
> > I print 3
> >
> > How is this not a contradiction?
> >
> 
> I believe the length operator was only added in 5.1; that version of
> PiL was written for 5.0.

Right. The second edition reads like this:

  A program can create string literals, concatenate them, and get string
  lengths.  But it cannot extract substrings or examine their contents.

-- Roberto