Use isNaN instead. For some reason I don't really get, this evaluates to
false in AS 3.0.

trace( (NaN == NaN) );

Cheers
Juan Pablo Califano

2008/10/30, Eric E. Dolecki <[EMAIL PROTECTED]>:
>
> if( Number(loc[0]) == NaN || Number(loc[1] == NaN )    return;
>
> Warning: 1098: Illogical comparison with NaN.  This statement always
> evaluates to false.
>
> Okay, so I have also tried
>
> if( loc[0] == NaN || loc[1] == NaN )
>    return;
>
> I get the same error. loc[0] 99.9% of the time is a string value of a
> number
> (ie. var loc:Array = msg.split(" ")). Sometimes it ends up NaN, I want to
> prevent NaN from going through to a later method. I would have thought I
> could simply check that for NaN.
>
> ??
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to