That find command

J. Landman Gay jacque at hyperactivesw.com
Wed Jan 29 15:01:01 EST 2003


On 1/29/03 1:37 PM, John Vokey wrote:
> All,
>   I'm baffled.  I know other commands, such as offset, are faster and 
> more useful, but I was trying to use the metacard (2.4.3, Mac OS X 
> 10.2.3) find command  and discovered that for some reason it doesn't 
> work, or at least I can't get it to work.  I finally stripped it down to 
> a simple stack with two fields, "test" and "out", with test containing 3 
> lines consisting of, respectively, "aaaa", "bbbb", and "cccc".  
> Executing the following simple stack script from the message box (using 
> any of the variations, including "string") fails to work (i.e., nothing 
> but the return is placed in the field "out").
> 
> on testit
>   find  "bbbb" in fld "test"
>   put the foundline into fld "out"
>   find string "aaaa" in fld "test"
>   put return & the foundline into fld "out"
> end testit

One problem is the last line of the script, which should be "put return 
& the foundline AFTER fld 'out'"

But you are right; find apparently doesn't go backward. The following 
script corrects the problem:

   find  "bbbb" in fld "test"
   put the foundline into fld "out"
   find empty -- does a reset
   find string "aaaa" in fld "test"
   put return & the foundline after fld "out"

This is odd though, because I could have sworn that earlier versions of 
MetaCard would reset the "find" location on its own if the parameter was 
changed. Maybe I'm hallucinating.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the metacard mailing list