That's a pretty lousy solution. Here's a better one:
program cnumlist, rclass
version 8.2
numlist `0'
local result "`r(numlist)'"
local result : subinstr local result " " ",", all
return local numlist "`result'"
end
i.e. this should take the same input as -numlist-.
Very little testing!
Nick
[email protected]
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Nick Cox
> While I agree on this, see -cseplist- in -listutil- on SSC,
> as one of several possible solutions.
>
> Enzo Coviello
>
> > I would find useful if -numlist could return, as option, a
> > comma separated
> > numeric list.
> > There is some Stata function, i.e. -recode -inlist, that
> > needs as input a
> > comma separated list.
> > So we could feed them directly with the r(numlist) output.
> >
> > I wonder if other Users would find useful this addition.
*
* 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/