aot_fun_do Subroutine

public subroutine aot_fun_do(L, fun, nresults, ErrCode, ErrString)

Execute a given function and put its results on the stack, where it is retrievable with aot_top_get_val.

The optional arguments ErrCode and ErrString provide some feedback on the success of the function execution. If none of them are in the argument list, the execution of the application will be stopped, and the error will be printed to the standard output. You have to provide the number of results to obtain in nresults. Keep in mind, that multiple results have to obtained in reverse order from the stack.

Arguments

TypeIntentOptionalAttributesName
type(flu_state) :: L

Handle for the Lua script.

type(aot_fun_type) :: fun

Handle to the function to execute.

integer, intent(in) :: nresults

Number of resulting values the caller wants to obtain from the Lua function.

integer, intent(out), optional :: ErrCode

Error code returned by Lua during execution of the function.

character(len=*), intent(out), optional :: ErrString

Obtained error string from the Lua stack if an error occured.


Calls

proc~~aot_fun_do~~CallsGraph proc~aot_fun_do aot_fun_do proc~flu_pcall flu_pcall proc~aot_fun_do->proc~flu_pcall proc~aot_err_handler aot_err_handler proc~aot_fun_do->proc~aot_err_handler interface~lua_pcallk lua_pcallk proc~flu_pcall->interface~lua_pcallk proc~flu_tolstring flu_tolstring proc~aot_err_handler->proc~flu_tolstring interface~lua_tolstring lua_tolstring proc~flu_tolstring->interface~lua_tolstring

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private :: err