lua-users home
lua-l archive

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


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