
Код:
var a:Number =Number.MAX_VALUE;
var b:int =int.MAX_VALUE;
function checkInt(obj:Object,i:String):void
{
// if (!(variable_exist(obj[i])))
// {
// trace("you idiot, there no such variable!!...freakin noobs, i need some to dring..eh life sucks")
// return ;
// }
if (!(obj[i] is Number))
{
trace("f*ck, this is string or what?")
return ;
}
if (obj[i]>int.MAX_VALUE)
{
trace("god deam it, this is bigger than int =(")
return ;
}
var side;
if (obj[i]>0) side=.1 else side=-.1
var old = obj[i];
obj[i]+=side;
if (old==obj[i])
{
trace("=)");
} else {
obj[i]=old;
trace("=(");
}
}
checkInt(this,'a');// =(
checkInt(this,'b');// =)
trace(b);//2147483647
trace(a);//1.79769313486231e+308
^__^