Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Use of subinword in Stata 13 vs. Stata 12
From
Dirk Enzmann <[email protected]>
To
[email protected]
Subject
st: Use of subinword in Stata 13 vs. Stata 12
Date
Fri, 19 Jul 2013 17:20:24 +0200
Most likely I am suffering from temporary blindness, but I can't see my
mistake:
When trying to use -subinword()-, I get different results in Stata 13 as
compared to Stata 12 (or 11, or 10). Example:
* --- Start Stata commands: ---------------
local vlist = "trunk"
local generate = ""
di subinword("`vlist'","`generate'"," ",.)
* --- End Stata commands. -----------------
Using version 13 the -display- command in the third line shows
trunk
(which I expect), whereas version 12 (or 11 or 10) shows
nothing. Why does the replacement of the occurance of "" in "trunk"
yields ""? And why does version 13 yield "trunk"?
Dirk
========================================
Dr. Dirk Enzmann
Institute of Criminal Sciences
Dept. of Criminology
Rothenbaumchaussee 33
D-20148 Hamburg
Germany
phone: +49-(0)40-42838.7498 (office)
+49-(0)40-42838.4591 (Mrs Billon)
fax: +49-(0)40-42838.2344
email: [email protected]
http://www2.jura.uni-hamburg.de/instkrim/kriminologie/Mitarbeiter/Enzmann/Enzmann.html
========================================
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/