AnsweredAssumed Answered

How to write a function with optical arguments

Question asked by wangjiajun on Aug 12, 2011
Latest reply on Sep 15, 2011 by changmeikuan
Dear all,

I want to write a function in VEE that allows some arguments to be optional, is it possible and how if so?

For example, I want to have a function called Test that allows up to 5 inputs and the last two inputs are optional. User can call this function by
Test(A,B,C) or Test(A,B,C,D) or Test(A,B,C,D,E). This is exactly like the build-in function strTrim(String [,TrimList]).

If not possible in VEE, an alternative is that I can write those functions in an external dll file and load its functions into the VEE. Now if I write Test(A,B,C,D) in VEE, will VEE pass A,B,C,D into the function "Test" without giving me any warning messages?