Re: What is up with the 'FIND' function?
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Mar 24, 2006
- 565 views
On Thu, 23 Mar 2006 21:24:42 +1100, Patrick Barnes <mrtrick at gmail.com> wrote: > >wait, nevermind... that's not right: > > >constant haystack1 = { {1}, {2}, {3}, {4}, {5}, {6} } >constant haystack2 = { 1, 2, 3, 4, 5, 6 } >constant needle1 = {3} >constant needle2 = 3 > >? find( needle1, haystack1 ) -- 3 >? match( needle1, haystack1 ) -- 0 >? find( needle1, haystack2 ) -- 0 >? match( needle1, haystack2 ) -- 3 >? find( needle2, haystack1 ) -- 0 >? match(needle2, haystack1 ) -- 0 >? find( needle2, haystack2) -- 3 >? match(needle2, haystack2) --0 > >Does that make more sense? > Apart from the fact that match(needle2 gives a type error... Pete