It is possible to overload a function with a identical signature, i.e. with the same number and types of parameters. See the following script:
Code: Select all
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<manialink version="1" background="title">
<timeout>0</timeout>
<script><!--
Void Function(Integer Param) {
log(Param);
}
Void Function(Text Param) {
log(Param);
}
Void Function(Integer Param) {
log("This method cannot be called. " ^ Param);
}
main() {
Function(42);
Function("Hello World");
}
--></script>
</manialink>
The compiler should complain about this issue, because you may wonder why your function is not called, because it already exists somewhere else. (I had that problem: I introduced a new function, yet accidentially gave it a name and parameter list of an already existing one, and wondered, why my new function was never executed.)