function foo() {
a += b;
}
function bar() {
b *= 10;
}
trace((foo(), bar(), a+b)); // outputs 23
Usage 3: The following example shows the use of parentheses with functions:
var today:Date = new Date();
trace(today.getFullYear()); // traces current year
function traceParameter(param):Void {
trace(param);
}
traceParameter(2*2);//traces 4
See also
with
42
Chapter 2: ActionScript Language Reference
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?