The multi-lines comments begin with "--[[" (double hyphen, double square brackets) and end with "]]" (double square brackets) .
-- this program is a simple test, and i'm a single line commentA good beginner material is a Free Spirit Magazine (Espírito livre, in portiguese), in theirs first 3 editions have articles about Lua.
print("this is normal line")
--[[
function opencb(reply)
for k, v in pairs(reply) do
print(k, v)
end
end
]]
print("the book is on the table")
The double brackets ( [[ ]] ) is used too for set long strings blocs to a variable, see the example code.
Today is this. Good week!

0 comentários:
Postar um comentário