Hi Guys,
I'm wondering if this is a bug or just a language difference between JS
and AS, I was pulling my hair out for awhile and wondering what the hell
was going on.
For example..
for (var j:Number = 0; j < arr1.length;) {
var currentByte = bitRow[0];
calcCount[j++] += (currentByte & 1);
calcCount[j++] += (currentByte & 2) >> 1;
calcCount[j++] += (currentByte & 4) >> 2;
calcCount[j++] += (currentByte & 8) >> 3;
calcCount[j++] += (currentByte & 16) >> 4;
calcCount[j++] += (currentByte & 32) >> 5;
calcCount[j++] += (currentByte & 64) >> 6;
calcCount[j++] += (currentByte & 128) >> 7;
}
Whenever j++ is read rather than assigning the increment after the value
is read it seems that ActionScript assigns the increment first, then
reads the value and then assigns it again! That's just craziness. Can
anyone else verify this or explain it?
Regards,
Drew Foehn
Actionscript Developer
HotHouse Interactive
---------------------------------
p: +61 2 9432 3655
e: [EMAIL PROTECTED]
---------------------------------
HotHouse Interactive Pty Ltd
Level 3, 154 Pacific Highway
St Leonards NSW 2067
Australia
---------------------------------
www.hothouse.com.au <http://www.hothouse.com.au/>
---------------------------------
_______________________________________________
[email protected]
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