Wish Unlimited number of arguments when using CallSub/CallSubDelayed

MarkusR

Well-Known Member
Licensed User
Longtime User
How does the VB6/VB.NET compiler support optional parameters, and can that ability be implemented in B4X?
for Test2 Sub see #19
VB6
 

JohnC

Expert
Licensed User
Longtime User
for Test2 Sub see #19
VB6
My question was really directed to Erel and asking him if it would be possible to modify the B4X IDE/Compiler to implement optional parameters just like Microsoft's VB6/VB.NET IDE/Compiler does so B4X will have all of the abilities that LucaMs listed in his first post.
 

LucaMs

Expert
Licensed User
Longtime User
Thanks but, even if I agree, optional parameters are useful (sometimes), I refer to the possibility of using CallSub and CallSubDelayed with an unlimited number of arguments, which is not the same thing.

I think that this thread could be considered closed
 

agraham

Expert
Licensed User
Longtime User
In languages in which support variable length parameter lists the compiler massages them into an array of Objects that is passed to the method so the actual method always has a fixed number of parameters in its declaration, the last of which is an Object array.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…