[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: The 4.1-alpha manual
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 26 Jul 2001 14:56:46 -0300
> But I wonder why "*w" is dropped (in the source too). It can't be
> replaced by "*u" because the isspace function can be true for several
> different characters (space, tab, newline, etc.).
You are right, it can't. The "*w" was dropped because it was quite
arbitrary in its definition of "word", and more often than not that
definition was not what we wanted. But we can put it back, if many people
miss it.
> You say that the format option %n$ is obsolete, but I don't see it in the
> previous manual.
Conversions can be applied to the n-th argument in the argument list,
rather than the next unused argument. In this case, the conversion
character % is replaced by the sequence %d$, where d is a decimal digit in
the range [1,9], giving the position of the argument in the argument list.
(Yes, it is not exactly a "format option"...)
> BTW, in [[ ]] strings, is there any way to have a ]] string?
Only if matched by a [[ before it. Otherwise you must write ']]' or "]]"
outside the [[ ]]. Sometimes I use the following code:
-- put eventual `[[' or `]]' outside string
s = gsub(s, "([%[%]])%1", "]]..'%1%1'..[[")
so that a "h ]] i" can be translated to [[h ]]..']]'..[[ i]].
> You say that 'in' is a new keyword in Lua 4.1, but it was listed as keyword
> in the Lua 4.0 manual. Perhaps it wasn't enforced?
Exactly.
> I don't see quotes and double-quotes in the list of tokens. But perhaps I
> miss the meaning of this list.
They are not tokens. The whole literal string ('...' or "..." or [[...]])
is the token.
-- Roberto