Hello, Kevin.
Besides Larry and Nadya considerations, notice that to be truly
optimizable, an expression have to match an index expression. So, if you want VFP to really speed up the searches you mentioned, you have to have an index on "new_cpt".
>>>I am updating a series of PRG's to optimize them for speed and to get them ready to convert into classes.
>>>
>>>I am finding statement's like:
>>>
>>> replace all cpt_code with h->new_cpt for;
>>> h->new_cpt<>space(10).and..not.subs(h->new_cpt,1,1)$'QHZ'
>>>
>>>My updated version is:
>>>
>>> REPLACE ALL Cpt_Code WITH Cdm.new_cpt;
>>> FOR NOT EMPTY(Cdm.new_cpt) AND NOT LEFT(Cdm.new_cpt,1) $ "QHZ"