Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: From: Trudy Cameron <>

Subject   st: From: Trudy Cameron <>
Date   Sat, 29 May 2004 14:37:12 -0700

Dear Statalisters:

I have been re-trying every possible fix for the above-mentioned
problem, about which I contacted the list on Friday. 

I was looking in the wrong place for the error, which turns out to be
trivial.  The code that works appears below.  

The problem was not with the global statements, but with the ensuing
display statements, which needed the -{- and -}- to force the
evaluation of the `ct' before expanding the global.  The global
statements were apparently working just fine.  It was the display
statements that were tripping me up by showing something else.

Have a good holiday weekend,

foreach ct of numlist 1/$MAXLINES {;
global LINK_`ct'    
global PROFILE_`ct' 
global INSPECT_`ct' 
global ENFORCE_`ct' 
display "${LINK_`ct'}";
display "${PROFILE_`ct'}";
display "${INSPECT_`ct'}";
display "${ENFORCE_`ct'}";
};  * end setup of global statements for use in writing output data;
*   For searches and help try:

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