Function Overloading
====================
```Example from 1 languages: C++
// volume of a cube
int volume(const int s) {
return s*s*s;
}
// volume of a cylinder
double volume(const double r, const int h) {
return 3.1415926*r*r*static_cast<double>(h);
}
```
```Example from 1 languages: Pascal
program Adhoc;
function Add(x, y : Integer) : Integer;
begin
Add := x + y
end;
function Add(s, t : String) : String;
begin
Add := Concat(s, t)
end;
begin
Writeln(Add(1, 2)); (* Prints "3" *)
Writeln(Add('Hello, ', 'World!')); (* Prints "Hello, World!" *)
end.
```
```Example from 1 languages: Speedie
function volume (|float| a, |float|)
return a*a*a
function volume (|float| r, |float| h, |float|)
// volume of a cylinder
return math.pi*r*r*h
```
*
Languages *with* Function Overloading include Java, C++, Kotlin, Pascal, Chapel, Dale, Speedie
*
Languages *without* Function Overloading include JavaScript, C, Python, Ruby, Bash, Rust, Scala, Haskell, C3, Lil, Jule
*
View all concepts with or missing a *hasFunctionOverloading* measurement
http://pldb.info/../lists/explorer.html#columns=rank~id~appeared~tags~creators~hasFunctionOverloading&searchBuilder=%7B%22criteria%22%3A%5B%7B%22condition%22%3A%22null%22%2C%22data%22%3A%22hasFunctionOverloading%22%2C%22origData%22%3A%22hasFunctionOverloading%22%2C%22type%22%3A%22num%22%2C%22value%22%3A%5B%5D%7D%5D%2C%22logic%22%3A%22AND%22%7D missing
http://pldb.info/../lists/explorer.html#columns=rank~id~appeared~tags~creators~hasFunctionOverloading&searchBuilder=%7B%22criteria%22%3A%5B%7B%22condition%22%3A%22!null%22%2C%22data%22%3A%22hasFunctionOverloading%22%2C%22origData%22%3A%22hasFunctionOverloading%22%2C%22type%22%3A%22num%22%2C%22value%22%3A%5B%5D%7D%5D%2C%22logic%22%3A%22AND%22%7D with
*
Read more about Function Overloading on the web: 1. 2.
https://en.wikibooks.org/wiki/Introduction_to_Programming_Languages/Overloading 1.
https://en.wikipedia.org/wiki/Function_overloading 2.
Built with Scroll v178.2.3