lua-users home
lua-l archive

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


> 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