Re: What is up with the 'FIND' function?

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu