﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
220	optional arguments in functions	imendez	danirus	"I think it would be a powerful imporvement the possibility of adding optional 
arguments in functions.

I propose the brackets characters ('[' & ']') to indicate that an argument is 
optional, like in the functions descriptions.
For example, If I want to create a function with the same behaviour that ""Round"", 
I will define:

Real Redondeo(Real numRed [, Real numDec = 0])
{
 Real inv = numRed*(10^numDec);
 Real ent = Floor(inv);
 Real mod = (inv)%ent;
 Real red = numRed-mod/(10^numDec);
 red
};

where the argument 'numDec' is optional:

Real a = Redondeo(4.41);
Real b = Redondeo(4.41, 0);
Real c = Redondeo(4.41, 1);
Real d = Redondeo(4.41, 2);

In this example, 'a' and 'b' have the same value (4), 'c' yields 4.4 and 'd' returns 
4.41.

Regards."	enhancement	closed	normal		Kernel	1.1.2	minor	remind		
