Open Source
lua.asc
Associated article: Lua: an Extensible Embedded Language
Tags: Open Source
Published source code accompanying the article by Luiz Henrique de Figueiredo, Roberto Ierusalimschy, Waldemar Celes in which they discuss Lua, a freely-available, general-purpose embedded programming language designed to support procedural programming with data-description facilities. It code compiles without change in most ANSI C compilers, including gcc (on AIX, IRIX, Linux, Solaris, SunOS, and ULTRIX), Turbo C (on DOS), Visual C++ (on Windows 3.1/95/NT), Think C (MacOS), and CodeWarrior (MacOS).
_Lua: An Extensible Embedded Language_
by Luiz Henrique de Figueiredo, Roberto Ierusalimschy, Waldemar Celes
Example 1:
(a)
t = {} -- empty table
t[1] = i
t[2] = i*2
t[3] = i*3
t[4] = i+j
(b)
t = {}
t.a = x -- same as t["a&...


