Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

The following pseudo code examplifies the Lua syntax highlighting used throughout this documentation.

--single line comment
 
--[[
    block comment
--]]
 
--keywords
and       break     do        else      elseif    end
false     for       function  goto      if        in
local     nil       not       or        repeat    return
then      true      until     while
 
--strings
a = 'alo\n123"'
a = "alo\n123\""
a = '\97lo\10\04923"'
a = [[alo
123"]]
a = [==[
alo
123"]==]
 
--numbers
3     3.0     3.1416     314.16e-2     0.31416E1
0xff  0x0.1E  0xA23p-4   0X1.921FB54442D18P+1
 
--functions
print(a)
print("Hello")
print(123)
 
for k,v in ipairs(t)
    print(v)
end

Pseudo Code extracted from Lua's Reference Manual.

  • No labels