Page 1 of 1
optional parameter []
Posted: Fri Mar 28, 2014 3:51 pm
by enric
Is there a way to define a FUNCTION with optional parameters?
FUNCTION myFunction (side, [opt1], [opt2]. [etc])
{
//this seems not be accepted by BA
}
Re: optional parameter []
Posted: Fri Mar 28, 2014 7:26 pm
by pipfromslitherine
No, not for user functions. There are certain callbacks which will happily take functions which need more parameters than they are called with from other parts of the system, but as this varies case by case it's not generally recommended as an approach.
Allowing for default parameters is on my scripting wishlist, but it's a considerable task.
Cheers
Pip