In addition to
unab v: _all
di "`v'"
ds
di r(varlist)
another way is available via -syntax- e.g.
sysuse auto, clear
syntax [varlist]
di "`varlist'"
which is a handy trick in a do-file in addition to being invaluable in
-program-s since you can supply a varlist to your do-file, or (by
default) let it operate on all variables.
On 11/3/07, Maarten buis <[email protected]> wrote:
> --- Philipp Rehm <[email protected]> wrote:
> > ds _all
> > di "`r(varlist)'"
> >
> > But you may want to select variables into a macro, based on the
> > patterns of their name (or other characteristics). Again, -ds- is
> > very helpful here.
>
> An extended version is -ds3- by Nick Cox downloadable from -ssc-
>
> --Maarten
*
* 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/