Learning ActionScript 2.0 in Adobe Flash |
|
|
|
| Best Practices and Coding Conventions for ActionScript 2.0 > Formatting ActionScript syntax > Writing return statements | |||
Don't use parentheses [()] with any return statements that have values. The only time to use parentheses with return statements is when they make the value more obvious, as shown in the third line of the following ActionScript code snippet:
return; return myCar.paintColor; // parentheses used to make the return value obvious return ((paintColor)? paintColor: defaultColor);
|
|
|
|