[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: RE: RE: RE: st: RE: problems on the string functions

From   "Nick Cox" <>
To   <>
Subject   RE: RE: RE: RE: st: RE: problems on the string functions
Date   Sun, 22 Nov 2009 15:21:44 -0000

I copied my last on this to Tech Support, who do refer it as a bug, and
have referred it to the StataCorp developers. So, I agree with Joseph
and it's already happening. 


Joseph Coveney

That's not good.  Although it leaves a missing value in its wake, its
messing up
of the string variable might go unnoticed, especially if the user
occasional blanks for other reasons.

It seems like something for StataCorp to remedy before others get bit
activities like Rose's.  In the interim, I guess the best protection is
get into the habit of using -assert- liberally.

Nick Cox wrote:

What is happening is that -- when v3 is a string variable and not empty

replace v3 = subinstr(v3, "", "", 1) 

zaps v3. That is, -v3- ends up empty. 

I am not sure why that is happening. For example, replacing empty
strings by empty strings looks like an example of no change to me. Also
even if "" is a substring of a non-empty string, it still has a

*   For searches and help try:

© Copyright 1996–2023 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index