skywalk wrote:Huh? I asked for example code, not words. I am trying to understand the benefits of this approach versus existing code?
Code: Select all
cTemp = "hi there"
mid(cTemp,2,3)="I T"
debug cTemp
"hI There"
Code: Select all
cTemp = left(cTemp,1)+"I T"+mid(cTemp,4)
In VFP there is a function called Stuff() -- did basically the same thing, but as a function, not a statement.
I find the reading of the statement (as above) to be confusing vs the function call:
Also; as a function, it's more flexible and more obvious what it's doing.
the MID() statement, once you read it, leaves me uncomfortable "Where is that being stored?"
Just my $.02