[sv-ec] 5.15.2 Array ordering methods

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Wed Nov 16 2005 - 06:52:49 PST
 <<Bresticker, Shalom.vcf>> Hi,

A question and a comment:

First, according to Steven's idea that multi-dimensional arrays are really one-dimensional arrays of arrays, could the array ordering methods then be used on multi-dimensional arrays as well?

Second, in the example,
struct { byte red, green, blue; } c [512];
c.sort with ( item.red ); // sort c using the red field only
c.sort( x ) with ( x.blue << 8 + x.green ); // sort by blue then green

it seems to be that the last line won't work, because both blue and green are 8 bits, so the entire 'with' expression will also be only 8 bits, not 16. The expression could be changed to "{x.blue, x.green}".

Thanks,
Shalom


Shalom Bresticker
Intel Jerusalem LAD DA
+972 2 589-6852
I don't represent Intel 


Received on Wed Nov 16 06:52:55 2005

This archive was generated by hypermail 2.1.8 : Wed Nov 16 2005 - 06:53:18 PST