[flexcoders] Calling functions with optional parameters

2008-11-14 Thread Amy
I thought that when you have a function that looks like this: private function theFunction(param1:int=0, param2:int=1, param3:String='foo') { //do stuff } That it's ok to call the function like this: theFunction(,,'bar'); But when I do this, I'm getting all sorts of syntax errors, including "

Re: [flexcoders] Calling functions with optional parameters

2008-11-14 Thread Fotis Chatzinikos
Amy (usually) all programming languages that support something similar support it from right to left, not with empty 'params'... theFunction() or theFunction(3) or theFunction(4,5) should work... i do not have access to the compiler at the moment thought, so i have not checked On Fri, Nov 14,

Re: [flexcoders] Calling functions with optional parameters

2008-11-14 Thread Maciek Sakrejda
- From: Amy <[EMAIL PROTECTED]> Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] Calling functions with optional parameters Date: Fri, 14 Nov 2008 21:12:16 - I thought that when you have a function that looks like this: private function theFunction

RE: [flexcoders] Calling functions with optional parameters

2008-11-14 Thread Tracy Spratt
What if you explicitly passed null? theFunction(null,null,'bar'); Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Amy Sent: Friday, November 14, 2008 4:12 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Calling