lua-users home
lua-l archive

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


>I am new to lua. As a beginner I have the first problem. I need a very short
>program to call a LUA procedure from C or Pascal(preferred). Let's say that
>the lua procedure will print on screen "Hello Beginner".

How about this (for Lua 4.0):

Lua:
	function hello() print "Hello Beginner" end

C:
	lua_getglobal(L,"hello");
	lua_call(L,0,0);


--lhf