-valuesof- does not sort and works with strings. Type
 . valuesof icd10code
 . local codelist `"`r(values)'"'
ben
> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Nick Cox
> Sent: Wednesday, February 22, 2006 7:09 PM
> To: [email protected]
> Subject: RE: st: long macro
> 
> OK. -levelsof- certainly sorts (although it has no
> problem with strings).
> 
> Nick
> [email protected]
> 
> Dedman, Dan
> 
> > Thanks all - I eventually worked out the issue evaluating vs.
> > copying macros, but I am still struggling with the double and
> > single quotes (it's a been a while...)
> > I believe -forval-, -levelsof- and -valuesof- don't help me,
> > either because they sort the values, or they require a
> > numeric variable. I need the values in a pre-specified order.
> 
> Nick Cox
> 
> > That said, what you want is already provided by either
> > -levelsof- in official Stata or the -valuesof- just announced
> > by Ben Jann.
> 
> *
> *   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/
*
*   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/