Advertisement
henke37

Function with reference argument

May 30th, 2013
370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var d:Object=new Object();
  2.  
  3. d.a=4;
  4.  
  5. function f(s:Object):void {
  6.     trace(s.a);
  7.     s=new Object();
  8.     s.a=5;
  9.     trace(s.a);
  10. }
  11.  
  12. f(d);
  13.  
  14. trace(d.a);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement