Re: [[ ]] terminated literal strings issue; adding global vars
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: [[ ]] terminated literal strings issue; adding global vars
- From: "Adam D. Moss" <adam@...>
- Date: 2006年1月08日 10:28:33 +0000
Mihai Hanor wrote:
The lua 5.0.2 returns an error when using literal
strings in code like:
--first example
print([[________]]])
--second example
print([[________]]________]])
It doesn't allow a [[]] literal string to end with ]]]
(at least one ] character next to the two final
delimiter characters ]] -> this is the first example).
Also it doesn't allow the a pair of ] characters
between the string's delimiters (this is the second
code example).
This is the expected and correct behaviour.
Lua 5.1 offers an alternative syntax which allows nesting
of [[ ]] blocks.
--Adam
--
Adam D. Moss - adam@gimp.org