Statalist


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

Re: AW: st: How to use the marco names?


From   Nick Cox <n.j.cox@stata.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: AW: st: How to use the marco names?
Date   Thu, 06 Aug 2009 13:21:29 -0500

You are correct in pointing out that in your example Stata strips isolated opening " but not such closing ", which also appears directly in

. display "c

However, I've not been bit by this while I've been using Stata. It's a small feature.

Nick

gjhxmu@sina.com wrote:

Nick and Martin, thank you very much!

Just as Nick pointed, I recognized my confusion was the use of -di-. However, I do need learn the use of -macro- too.

A doubt appears when learning the use of -di-. What is the difference between "" and `""'? In -di- help,I guess the only difference is the latter allows embedded quotes, am I right?

Additionally, there is a small question below.
. foreach i in a" "b" "c {
  2. di `"`i'"'
  3. }
a"
b
c
Where is the quote before c. Namely, I think the result should be
a"
b
"c


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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