Skip to content

Latest commit

 

History

History
37 lines (22 loc) · 733 Bytes

lua-snippets.md

File metadata and controls

37 lines (22 loc) · 733 Bytes

Lua

##Resources

Lua is compiled into bytecode then run on the Lua virtual machine.

##Uses

Games written in Lua - https://en.wikipedia.org/wiki/Category:Lua-scripted_video_games

###Loop

for i=1,10 do
  print("Lupus")
end

###Function

function f(state, list) 
end

###Tables and MetaTables

Simple list based structure

###Classes and Inheritance

None as such, but classes can be implemented using functions and putting data inside tables.

Inheritance can be implemented using the metatable mechanism.