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 "
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,
-
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
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
4 matches
Mail list logo