Embedded Lua-Script into C

Sven Bachmann
This weekend, I played around a bit with Lua and C. My aim was to understand the Lua basics, embed the script engine into C and be able to even call a C function from Lua. With Google and a lot of documentation spread around the web this was a fairly easy task. The result are 2 short files. First file is the C-code main.c which initializes Lua, registers the C-function which will be later called by Lua and then executes the Lua-script.