インクリメント 前置演算と後置演算
♥0 |
Line 19 |
Modified 2014-05-20 08:40:58 |
MIT License
archived:2017-03-30 02:41:05
ActionScript3 source code
/**
* Copyright tepe ( http://wonderfl.net/user/tepe )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/ydZc
*/
package {
import flash.display.*;
import flash.text.*;
public class FlashTest extends Sprite {
public function FlashTest() {
var t:TextField = new TextField();
t.height=400;
t.width=400;
addChild(t);
var i:int;
t.text="i++ : インクリメントする前に値を参照する\n";
i=0;
t.appendText((i++).toString()+"\n");
t.appendText("++i : 先にインクリメントしてから値を参照する\n");
i=0;
t.appendText((++i).toString()+"\n");
}
}
}