.. highlightlang:: us .. index:: lua_call .. _lua_call: lua_call ======== .. us.tag lua_call NOTREADYGERMAN Lua New5800 :ref:`lua_call` ruft eine Lua-Funktion auf. .. function:: ret = lua_call(function, par1, ...) = lua_call(function, par1, ...) .. us.return **Returnwert** *ret* ist eine Zahl (64-Bit double) oder ein Lua-Value. .. list-table:: :header-rows: 0 * - LUA_TNIL * - LUA_TBOOLEAN * - LUA_TLIGHTUSERDATA * - LUA_TSTRING * - LUA_TTABLE * - LUA_TFUNCTION * - LUA_TUSERDATA * - LUA_TTHREAD .. us.params **Parameter** .. uparam:: function *function* .. uparam:: par1 *par1* .. uparam:: ... *...* .. us.example **Beispiel** **sin**-Funktion der Lua-math-Library aufrufen: :: lmath = lua_require("math") lsin = lua_get(lmath, "sin") lua_call(lsin, 1) 0.8415 Die :ref:`lua_require` und :ref:`lua_get`-Funktionen verwenden auch die :ref:`lua_call`-Funktion. :: def lua_require(s) { return lua_call("require", s) } def lua_get(table, index) { return lua_call("rawget", table, index); } .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Beschreibung * - R2016 - Neu. .. seealso:: :ref:`overview-lua`, :ref:`lua`, :ref:`lua_string`, :ref:`lua_require`, :ref:`lua_get`, :ref:`lua_eval`, :ref:`lua_type` :sub:`id-1323776`