- This topic has 1 reply, 2 voices, and was last updated 9 years, 7 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Integrated Application Platform
Integrated Application Platform › Forums › General › Function overloading
Is there in Suneido an option to do function overloading? I mean in the way that a function definition has several versions, each with different arguments and functionality?
As far as I know you can’t have multiple definitions of the same function/method except when overriding the definition in another library in which case only the last definition is used (but you can call the super definition within the method)
By using default parameter values or the ‘@’ when specifying your parameter list for a function/method you can allow quite a lot of flexibility in the way the function/method is called (especially if you’re naming the arguments), but you’d still need to handle the different combinations of arguments in the one method.