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: Macro parsing question.

From   Amadou DIALLO <>
To   statalist <>
Subject   st: Macro parsing question.
Date   Thu, 14 Feb 2013 10:24:40 +0100

I spent the night programming some stuffs but cannot understand why I
don't obtain the expected results. I was expecting "%" but got
"Value". What am I doing wrong?

	noi se tr on
	loc list1 a
	loc list2 a b c
	loc d
	foreach j of loc list1 {
	   foreach k of loc list2 {
	      if "`j'" == "`k'" loc d %
	      else loc d Value
	   } // foreach k
	di "`d'"

Amadou B. DIALLO, PhD.
Senior Economist, AfDB.
*   For searches and help try:

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