David Kantor replied very fully to Dimitriy Masterov.
I just want to underscore his theme: if you are
writing your own programs in Stata, getting to
grips with -syntax- is a top priority.
As a footnote, the number of variables can also
be obtained by
program myprog
version 8
syntax varlist
di "The number of variables is `: word count `varlist''"
end
Nick
[email protected]
*
* 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/