At 21:18 Uhr -0500 04.11.1999, Raymond E. Griffith wrote:
>  > From: Nelson Zink <[EMAIL PROTECTED]>
>  > I want to know whether a particular number resides in a distant cd fld
>Use the "offset" function. Eg: offset("007",fld "Agents" of cd "Espionage")
>
>This will return 0 if not found.

There are better options:

   if "007" is in fld "Agents" of cd "Espionage" then ...

which is better to read than the offset function... and you dont seem 
to be interested in the exact location of the pattern.

Even would be

   if "007" is among the lines of fld "Agents" ...

Because those other options would also match agent "0007" or "0074".

If you want the exact line number, try

   get lineOffset("007",fld "Agents" of cd "Espionage")

But remember to set the wholeMatches to true, or you'll have the same 
problems as with the offset function.

Regards
   R�diger
--------------------------------------------------------------------
| Ruediger zu Dohna   GINIT GmbH   0721-96681-63    [EMAIL PROTECTED] |
| PGP-Fingerprint: F1 BF 9D 95 57 26 48 42 FE F8 E8 02 41 1A EE 3E |
--------------------------------------------------------------------

Reply via email to