Re: What is up with the 'FIND' function?
Dang, sorry about that last post, pressed the button too early!
Anyway, Jules, I see your point. I know about the difference between
'c' and "c", but I didn't understand that it would make a difference
when my code problem arised. I see it now, though. In my example,
the FIND searches for a "c" (sequence format), but tries to match that
with each induvidual ATOM in zALPHA - which of course doesn't match.
(Hope I got it right, and didn't make an ass of myself. :))
Again, thanks to you and all for their feed backs.
Regards, Ken aka ZNorQ.
Jules Davy wrote:
>
> Hi Ken,
>
> This discrepancy arises because an atom is not equivalent to a one element
> sequence
> containing the same value. Therefore, to use your example, eRevision does not
> contain
> 'c', but "c" (because it has been declared as a sequence). If you declare
> eRevison
> as an atom then
>
> eFindResult = find(eRevision, zALPHA)
>
> will return 3, as required.
>
> Alternatively you could replace the "find" function with "match", this finds
> a
> sequence as a SLICE of another sequence. So
>
> eFindResult = match(eRevision, zALPHA)
>
> will also return 3.
>
> Not sure whether this has helped or made you more confused!
|
Not Categorized, Please Help
|
|