lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi, 

I just added a power (hopefully :-}) patch to the lua-users wiki
which adds

lua_dolines(lua_State *L, char *fname, FILE *f, int *lineno) 

to the Lua API in order to be able to execute Lua code from an already
open file until '$' is encountered.

I created this  patch because I wanted  to be able to use  Lua in data
files  as they  are necessary  e.g.  to  store finite  element meshes,
where one needs  to read huge amounts of data  directly into C arrays.
Basically I want to mix Lua chunks with chunks parsed by other code. A
little bit more on this you find in the README.

May the Light of Lua Guide you Well

Juergen Fuhrmann

                             Numerical Mathematics & Scientific Computing
               Weierstrass Institute for Applied Analysis and Stochastics
   Mohrenstr. 39 10117 Berlin    fon:+49 30 20372560   fax:+49 30 2044975
http://www.wias-berlin.de/~fuhrmann        mailto:fuhrmann@wias-berlin.de