Martin Klasson wrote:
Run this, once in flash player6-setting, and one time in 7/8, both
compiled with as2. The Strong-typing of the parameter doesn't affect the
result.

But how come this is so indifferent results, was perhaps the output of
flsahplayer6 wrong accordingly to ecma?

trace(!isNaN(undefined))

That would be pretty old news and was one of the things changed back then.

var t;
trace(Number(t));
// gives:
//   0   in Flash 6
//   NaN in Flash 7+

Just like:

var s;
trace(String(s));
// gives:
//   ""          in Flash 6
//   "undefined" in Flash 7+

That is, Number- and String-conversion of undefined was changed. So was String-to-Boolean-conversion (non-empty string are alwas true now) and null-to-Number-conversion (null is NaN, not 0) - at least those are the 4 primitive datatype conversion changes that I remember :)

It was done in order to conform with the ECMAScript standard, yes. :)

--
Morten Barklund - Information Architect - Shockwaved
Gothersgade 49, 4th floor - DK-1123 Copenhagen K, Denmark
Phone: +45 7027 2227 - Fax: +45 3369 1174
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to