a C gateway function uses to call overload function or macro
CallOverloadFunction(_iVar)
:
a C gateway function uses to call overload function or macro
This example returns the size:
int callOverload(char *fname,unsigned long fname_len)
{
CheckRhs(1, 1);
CheckLhs(0, 1);
CallOverloadFunction(1);
return 0;
}
function x=%c_getSize(a)
x = lenght(a);
endfunction
function x=%s_getSize(a)
x = `size`_(a);
endfunction
a = [1,2,3,4];
a_ref = [2,2];
`assert_checkequal`_(getSize(a) == a_ref);
b = ["May","the","puffin";"be","with","you"];
b_ref = [3,3,6;2,4,3];
`assert_checkequal`_(getSize(b) == b_ref);