実引数の評価順序

by alotfuck
実引数の評価順序,あー、はずれた。つまんない。
♥0 | Line 26 | Modified 2009-07-09 12:28:55 | MIT License
play

ActionScript3 source code

/**
 * Copyright alotfuck ( http://wonderfl.net/user/alotfuck )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/pD00
 */

package {
    import flash.display.Sprite;
    
    /**
    * 実引数の評価順序,あー、はずれた。つまんない。
    */
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            var a:int=0;
            test(a++,a++,a++);
        }
        
        private function test(a1:int , a2:int , a3:int):void{
            new Text(this , 10,10,"a1 : "+a1); 
            new Text(this , 10,40,"a2 : "+a2); 
            new Text(this , 10,70,"a3 : "+a3);  
        }
    }
}

import flash.text.TextField;
import flash.display.*;
class Text extends MovieClip{
    
    public function Text(container:Sprite,xx:Number,yy:Number,value:String){
        this.x=xx;
        this.y=yy;
        var txt:TextField = new TextField();
        txt.text = value;
        addChild(txt);
        container.addChild(this);    
    }    
}