lua-users home
lua-l archive

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


> can anyone help me out there. i wrote a program in C
>to send a string a=2;b=a+1. , now i want to get the
>value of b into the C program variable called d, so
>that i can do a printf() of the value of d in C

	lua_dostring(L, "a=2;b=a+1");
	lua_getglobal(L,"b");
	d=lua_tonumber(L,-1);

--lhf