Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[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 <>
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. ------------


Dr. Dirk Enzmann
Institute of Criminal Sciences
Dept. of Criminology
Rothenbaumchaussee 33
D-20148 Hamburg

phone: +49-(0)40-42838.7498 (office)
       +49-(0)40-42838.4591 (Mrs Billon)
fax:   +49-(0)40-42838.2344
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index