Sorry,

already answered question :)

---------8<-------------------
It cannot be done inside STUFF() due to strictly defined Clipper
compatible syntax.
To optimize code which make
   <cVar> := STUFF( <cVar>, <nPos>, <nDel>, <cIns> )
it's necessary to detect that result of STUFF() function
is assigned to the same variable as its 1-st parameter and
replace above code by new funtcion which will operate
on parameter passed by reference, i.e.:
   __STUFF( @<cVar>, <nPos>, <nDel>, <cIns> )
So it needs new function and compile time optimization.
-------->8---------------

Maurilio.


Maurilio Longo wrote:
> Hi,
> 
> why is Stuff() copying received parameter into a new item even when the number
> of deleted chars equals the number of inserted ones or, more in general, when
> current item can hold the result of the stuff() call without need to resize 
> it?
> 
> Best regards.
> 
> Maurilio.
> 

-- 
 __________
|  |  | |__| Maurilio Longo
|_|_|_|____| farmaconsult s.r.l.


_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to