That is really weird, huh? Well, for strings, I think it's often better to use .length for Boolean tests, anyway:
function test(s:String) { if (s.length) { // Catches any nonempty string. } else { // Catches null, undefined, and empty strings. } } -- T. Michael Keesey -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of janosch Sent: Wednesday, July 19, 2006 10:24 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Difference between null and undefined? Thats very strange, but in usual case you do not check for the pure value, but for the value, saved in a variable: a = "foo"; trace(!a); // false Janosch Mike schrieb: >That's what I thought, too, but when I did the test, !"foo" evaluated as >true. > >trace(!"foo"); /// Outputs "true". >-- >T. Michael Keesey _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com