On Tuesday, 4-September-2007 at 20:27:12 Kai Peters wrote,

>
>That was a horrible read - let me try this again:
>
>I am struggling with this problem:
> 
>Given the "table"
> 
>table: [
>   [ 3 "Tim" "Peterson" 2 ]
>   [ 1 "John" "Smith"   3 ]
>   [ 2 "Jeff" "Brown"   1 ]
>]
> 
>How can I search for the record whose first value is 1 (John Smith)
>and return its index in the table (2 in this case) ?
> 
>The search criterion is only unique in the fist value of each "record".

This would be one way...

forall table [if table/1/1 = 1 [print index? table]]

But I agree with MAx that you could make it simplier by changing the the way 
the table's organized.

-- Carl Read.


>As always, thanks for any help!
> 
>Kai
>
>-- 
>To unsubscribe from the list, just send an email to 
>lists at rebol.com with unsubscribe as the subject.
>
>
>
>
>-- 
>No virus found in this incoming message.
>Checked by AVG Free Edition. 
>Version: 7.5.485 / Virus Database: 269.13.5/989 - Release Date: 4/09/2007 5:54 
>p.m.
>

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to