Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question on user-defined function
#1
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
Code:
Copy      Help
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?


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)