08-30-2014, 04:05 PM
How do you handle the case of a user-defined function in which I have 2 different types.
Let say I have one like this:
Function Function10
The problem is if I pass in the int array it works fine. But if I pass in the string param only, it complains about "type mismatch", since it expect to have an int array too?
Note: I know if I create 2 separated functions, each with one param then no problem at all. But
I want to combine them in one function only. Is it possible?
Let say I have one like this:
Function Function10
function [ARRAY(int)'aInt] [~textStr]
if (aInt.len)
;do something
,,
if (textStr.len)
;do something else
The problem is if I pass in the int array it works fine. But if I pass in the string param only, it complains about "type mismatch", since it expect to have an int array too?
Note: I know if I create 2 separated functions, each with one param then no problem at all. But
I want to combine them in one function only. Is it possible?