Nengbing Tao wrote:

> Thanks!
>
> Not quite yet!
> Each number can appear once in each column in the end output! This would
> work for cases where those pair do not overlap. The problem comes in cases
> like
> @xa=(900,1000,1010,2040,2010,8000,9999);
> @xb=(899,1005,1022,2020,2000,6000,9999,20000);

What is it you are trying to accomplish here?  In practical terms, that is.  Something 
doesn't really click here, reading across lists of uneven length.  Its basically a 
design decision.  What is more appropriate, to take unmatched positions and view them 
as null?  Then your absolute difference would be undefined.  Or to view empty elements 
as 0--which would make the absolute difference equal to the absolute value of the 
element that is defined.

AS to sorting when you have matching values, the only solution I can see is to expand 
your ordering criteria, by adding a secondary sort field, perhaps doing the inner sort 
on the value of the element in the first list.

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to