PLDB
Languages Features Creators Calendar CSV Resources Blog About Donate Add Language
GitHub icon

Function Overloading

< >
// 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 Pascal, ADLIB, Extended 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.

Languages with Function Overloading include C++, Pascal, Dale, Real-Time Concurrent C, ADLIB, Extended Pascal

Languages without Function Overloading include JavaScript, Ruby, TypeScript, C3, Jule, Static Typescript

Read more about Function Overloading on the web: 1. 2.

HTML of this page generated by Features.ts

hasFunctionComposition.html 路 hasFunctionOverloading.html 路 hasFunctions.html

View source

PLDB - Build the next great programming language Search v2023 Day 157 Docs Acknowledgements Traffic Today Traffic Trends Mirrors GitHub feedback@pldb.com