Mailing List
Home
Forum Home
Flash Pro
Subjects
Subject: RE: Firework Effect
Web Service Results
Flash Interface with 10mb xml file
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash MX 2004 Sucks
Reading and displaying RSS feeds in Flash MX
Flash and QuickTime VR
Textfield prototype question
XML to Object help
Order of events per frame
MX2004 Dataset itemClassName
memory management removeMovieClip /
Event Dispatcher between classes
Help: MX 2004 How to script a print button to print the entire sli
ScrollPane component doesn 't auto update
setInterval bug identified and fixed
setInterval bug identified and fixed
Listener Object 's best practice
 
Non-empty strings in boolean context - Flash7

Non-empty strings in boolean context - Flash7

2004-03-20       - By Andreas Weber

 Back
Reply:     1     2     3     4     5     6     7     8     9     10  

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)