Function Call Expression Summary Calls a function with the specified arguments. Syntax function([ argument1 [, argument2 [, ... argumentN ] ] ]) Parameters function The name of the function to call. argumentN Any legal expression to supply as an argument to the function. Description A function call expression is used to execute a specified function with the provided arguments. If the function being called is overloaded, the compiler will attempt to match the argument types with the function parameter types. If there are no matching function declarations, a compile-time error will be raised. If there is more than one possible match, the compiler will use the most specific overload first before attempting to convert argument types. See the function overloading page for more information on overloading is handled. Examples Basic Usage 123456789import System; int plus(int a, int b) { return a + b;} Console.log(plus(1, 1)); // 2Console.log(plus(1, 3)); // 4Console.log(plus(5, 5)); // 10 Calling Overloaded Functions 12345678910111213import System; // First overloadint plus(int a, int b) { return a + b;}// Second overloadint plus(int a, int b, int c) { return a + b + c;} Console.log(plus(1, 1)); // Calls first overload. Result: 2Console.log(plus(1, 1, 1)); // Calls second overload. Result: 3 See Also Overloading Share HTML | BBCode | Direct Link