>Einar:
>
>>>>>>>>>>>
>Here is one solution (I think) with only one loop and I am also using the < pre > tags for the first time ;)
>
>
>for i = 1 to alen(myarray)
> if ascan(myarray, X - myarray(i)) > 0
> return myarray(i), myarray(ascan(myarray, X - myarray(i)))
> endi
>next i
>
>>>>>>>>>>>
>
>No cigar again. ASCAN traverses (loops through) the array to locate the desired element so your solution still involves a double loop.
>
>Daniel
But it only looks like one loop <bg>
Einar
Semper ubi sub ubi.