+ 1

What is overloading means?

7th Mar 2017, 7:23 AM
Abenezer Seleshi
2 ответов
+ 3
giving multiple ways for passing arguments in the same function.
7th Mar 2017, 7:32 AM
seamiki
seamiki - avatar
+ 1
As i understood the lesson it gives you the possibility to create several function using the same name but using different arguments type and differents amount of arguments. Then, when you call the function the script will automaticly trigger the function that fit what arguments you have use. If you have: myFunct(string arg1) and myFunct(int arg1) and then you call myFunct with a string, the script will use the function using string argument. But if you call the function with a type not defined in any of your myFunction, you will get an error.
7th Mar 2017, 7:57 AM
Geoffrey L
Geoffrey L - avatar