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: Why do `test' and a`test' make a difference?
From
Dirk Enzmann <[email protected]>
To
[email protected]
Subject
st: Why do `test' and a`test' make a difference?
Date
Sun, 10 Feb 2013 14:18:28 +0100
Why does the backslash as part of the global macro $path vanish (and
`test' is not evaluated as a local macro) when immediately combined with
the local macro `test', although it does not vanish (and the content of
`test' is displayed) when not immediately combined as shown in the two
variants of -di- in the example below?
* --- Stata example start: -----------
global path = "d:\my folder\"
local test = "pre_"
di "${path}`test'my name.dta"
di "${path}a`test'my name.dta"
* --- End Stata example. ------------
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/