external_call


描述

If you have created an external function call to a dll or dylib using external_define, you can use this function to then call it. You supply the name of the previously defined function as well as each of the arguments it requires (each argument must be of the correct type, either real or string) and the function returns the result of the external call.

重要!该函数在试用版(Trial License)产品中可用。


语法:

external_call(id, args[0...15]);

参数 描述
id The name of the function that you want to call
args[0...10] The different arguments that you want to pass through to the external function


返回:

Value (the type of value returned will depend on the defined function)


例如:

my_function = external_define("MyDLL.dll", "MyMin", dll_cdecl, ty_real, 2, ty_real, ty_real);
var _a = external_call(my_function, x, y);

The above example code calls a previously defined external function and stores the returned value in a local variable.