Top "Default-parameters" questions

A default parameter is a function or method parameter that has a default value provided to it.

Does Java support default parameter values?

I came across some Java code that had the following structure: public MyParameterizedFunction(String param1, int param2) { this(param1, param2, …

java methods parameters overloading default-parameters
Set a default parameter value for a JavaScript function

I would like a JavaScript function to have optional arguments which I set a default on, which get used if …

javascript function parameters arguments default-parameters
C default arguments

Is there a way to specify default arguments to a function in C?

c arguments default-parameters
"Least Astonishment" and the Mutable Default Argument

Anyone tinkering with Python long enough has been bitten (or torn to pieces) by the following issue: def foo(a=[]): …

python language-design default-parameters least-astonishment
T-SQL - function with default parameters

I have this script: CREATE FUNCTION dbo.CheckIfSFExists(@param1 INT, @param2 BIT = 1 ) RETURNS BIT AS BEGIN IF EXISTS ( bla bla …

tsql function default-parameters
Default Values for function parameters in Python

Possible Duplicate: default value of parameter as result of instance method While it is possible to set default values to …

python function defaults default-parameters
C# 4 default parameter values: How to assign a default DateTime/object value?

If DateTime is an object and default C# parameters can only be assigned compile-time constants, how do you provide default …

c# default-parameters
Type Hinting: Default Parameters

PHP 5 Type Hinting PHP 5 introduces Type Hinting. Functions are now able to force parameters to be objects (by specifying the …

php type-hinting default-parameters
Compiler error "Default parameter specifiers are not permitted"

Below is my code. public class PItem { public String content; public int count; public int fee; public int amount; public …

c# compiler-errors .net-3.5 default-parameters
Getting Eclipse to open .html in text-editor by default?

Eclipse Juno keeps opening my HTML files in a embedded web-browser, rather than in an embedded syntax-highlighting editor. I have …

eclipse django-templates html-editor eclipse-juno default-parameters