X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fok%2Fcompareseq.as;fp=lib%2Fas3%2Fok%2Fcompareseq.as;h=ea61782a8cb25cff1b7fb8e7e8c374e47b37d0c4;hb=18b8ab0d7614dceda8836fe3bc50df7cbb41d85a;hp=0000000000000000000000000000000000000000;hpb=c7d1f6a33a15440a009e99118b8b91d124a18125;p=swftools.git diff --git a/lib/as3/ok/compareseq.as b/lib/as3/ok/compareseq.as new file mode 100644 index 0000000..ea61782 --- /dev/null +++ b/lib/as3/ok/compareseq.as @@ -0,0 +1,42 @@ +package { + import flash.display.MovieClip + + public class Main extends flash.display.MovieClip { + + var count:int = 1; + var num:int = 16; + + function istrue(b:Boolean) { + if(b) { + trace("ok "+count+"/"+num); + } else { + trace("error "+count+"/"+num); + } + count = count + 1 + } + function isfalse(b:Boolean) { + istrue(!b); + } + + function Main() { + trace("ok"); + + istrue(1 < 2 < 3); + isfalse(2 < 1 < 3); + isfalse(3 < 2 < 1); + isfalse(1 < 3 < 2); + isfalse(2 < 3 < 1); + isfalse(3 < 1 < 2); + + isfalse(1 > 2 > 3); + isfalse(2 > 1 > 3); + istrue(3 > 2 > 1); + isfalse(1 > 3 > 2); + isfalse(2 > 3 > 1); + isfalse(3 > 1 > 2); + + trace("[exit]"); + } + } +} +