Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Program and local macro


From   <[email protected]>
To   <[email protected]>
Subject   st: Program and local macro
Date   Tue, 29 Aug 2006 16:13:00 +0200

Dear all, 

I'm a beginner in Stata programming.
I don't understand why this syntax is invalid

 forvalues i=2/4 {
  2. forvalues j=1/nb_exam[`i'] {
  3. dis nb_exam[`j'] 
  4. }
  5. }
invalid syntax

I have tried 

 forvalues i=2/4 {
  2. forvalues j=1/`nb_exam[`i']' {
  3. dis nb_exam[`j'] 
  4. }
  5. }
invalid syntax

It's not better.

Can someone explain me ?

Thank you


Alvine 


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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