search for: optional_args

Displaying 2 results from an estimated 2 matches for "optional_args".

Did you mean: option_args
2006 Jul 13
5
Does Javascript let you default input params like Ruby does?
Can you have a Javascript function with a param that''s defaulted if it isn''t present? function X(a, b = false, c = ''dog'') { } X(5) calls X with a=5, b=false, c=''dog'' X(4, true) calls X with a=4, b=true, c=''dog'' X(3, true, ''cat'') calls X with a=3, b=true, c=''cat'' ? -- Posted via
2012 Jul 14
6
[PATCH 0/6] Allow non-optargs functions to gain optional arguments.
This rather complex set of patches allow non-optargs functions to gain optional arguments, while preserving source and binary backwards compatibility. The problem is that we cannot add an optional argument to an existing function. For example, we might want to add flags to the 'lvresize' API which currently has no optional arguments.