Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Feature of the -inlist- function


From   [email protected] (William Gould)
To   [email protected]
Subject   Re: st: Feature of the -inlist- function
Date   Thu, 18 Jul 2002 09:27:02 -0500

Roger Newson <[email protected]> discovered, 

> According to -[U] 16.3 Functions-, the maximum number of arguments to
> -inlist- is 255 (either all reals or all strings). However, for some reason,
> -inlist- seems to fail for me with 6 string arguments. [...]

Mark it down as a bug, a bug I admit we have known about for a while now and
still have not fixed, mainly because no one has complained.  Nor in the
meantime have we fixed the documentation because we would rather fix the code.

The problem is this:  -inlist()- will allow up to 255 arguments, but Stata's
overall expression parser runs out of space to store the strings, given 
where -inlist()- is putting them.  That it runs out at 6 is indeed
embarrassing and something we we could easily address.  Getting the parser 
to provide space for for 255, however, is more difficult, so no one has even
bothered to move the 6 up to a more reasonable limit.  Instead, we plan a
major rewrite of -inlist()- so that it stores its strings somewhere else, but
that's a lot of work and, as I said, no one has complained, so no one here has
done that yet.

And there we sit.  It is all rather embarrassing.

It is, however, on a to-do list, of that I can assure you, and now someone has
complained, so it will move up, but only a little, given the lack of serverity
of the problem.  In the meantime, if you use -inlist()- with strings, you will
have to restrict yourself to 6 arguments.

-- Bill
[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/



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