Page 2 of 2

Posted: Thu Dec 18, 2003 7:11 pm
by Psychophanta
Fred wrote:
The optional parameters for procedure will be implemented in PB very soon as it can be useful. It's not a function overloading, it's just a default value for parameters when not specified. Example:

Code:


Procedure MyPlot(x, y, Color = $FF)
..
EndProcedure

MyPlot(x,y) ; Red as default
MyPlot(x,y, RGB(51,51,51))
Who gave you that idea :?: :idea:
That's useful, and easy to implement, isn't it?

Posted: Thu Dec 18, 2003 11:19 pm
by Fred
It works like this in C/C++. And yes it's easy to implement :wink:

Posted: Fri Dec 19, 2003 10:06 am
by tinman
Fred wrote:It works like this in C/C++. And yes it's easy to implement :wink:
Well, not in C ;)
AmiBlitz also does this now I think ;)

Posted: Fri Dec 19, 2003 10:58 am
by Psychophanta
AmiBlitz also does this now I think ;)
Wops! I didn't know :roll:
Well, not in C ;)
Well, welcome a new C language. There was C, after that C++, and after that C;)