  | | | Non-empty strings in boolean context - Flash7 | Non-empty strings in boolean context - Flash7 2004-03-20 - By Andreas Weber
Back In Flash 7 in OR statements the order of evaluating the Booleans seems to be reversed when it only contains strings: the last value is evaluated first.
trace('one' || 'two' ||'three'); Output in Flash 7: three (same as in Flash 6)
When it also contains variables which first have to be evaluated to Strings (or other values) before being evaluated to Booleans, the order is correct: the first value is evaluated first.
trace(one || 'two' || 'three'); Output in Flash 7: two
trace('one' || two ||'three'); Output in Flash 7: one
-- ---- ------ Andreas Weber motiondraw.com
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:107547 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|
 |