[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Writing "raw" strings in Lua
- From: "Pedro Miller Rabinovitch" <miller@...>
- Date: Fri, 2 Jan 1998 06:09:00 +0000
> What is this [[]] stuff?
> I don't remember reading about it in the manual.
If Lua encounters a [[ while parsing through commands, it enters
"string mode" and reads anything it finds as string characters until
it reaches a ]]. That way, you can write things such as
write( [[ This is in one line
and this is in another. ]] )
or even
dostring( [[
function Test ()
print( "It works!" )
end
]] )
Very nice for writing out HTML in CGI-Lua.
Regards,
Pedro
Pedro Miller Rabinovitch
miller@tecgraf.puc-rio.br
The art of acting consists in keeping people from coughing.
Sir Ralph Richardson