Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Overloading function defenitions
konstantin_shiriazdanov
Member Posts: 1,221 ✭✭✭✭✭
Is there an opportunity to overload user defined functions for several types of arguments? For example for ValueWithUnits and Vector types?
0
Comments
-
You can, but it's also just as easy to specify no type in the function declaration and then test the type within the function.Senior Director, Technical Services, EMEA0
-
@NeilCooke I'd like to test perfomance for if operator vs function overloading, so i should just add another function with the same name for another type of argument?
0 -
Yes that will workSenior Director, Technical Services, EMEA0

