A C gateway function which provides the number of output arguments present in the calling Scilab function
int* nb_params = getNbOutputArgument(void* _pvCtx)
int nb_params = nbOutputArgument(void* _pvCtx)
int nb_params = Lhs
Scilab environment pointer, pass in "pvApiCtx" provided by api_scilab.h
the pointer on the number of output arguments present in the calling Scilab function
getNbOutputArgument provides a C gateway function which provides the number of output arguments present in the calling Scilab function. You must include api_scilab.h to benefit from this function.
In this example, the C gateway function can take several output arguments and prints in the Scilab console the integer corresponding to the number of output arguments detected in the calling Scilab function.
#include "api_scilab.h" #include "sciprint.h" int sci_mylhs(char * fname) { sciprint("The number of output arguments is %d\n", *getNbOutputArgument()); return 0; } | ![]() | ![]() |