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

st: Re: Recognizing the full length of a macro


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: Recognizing the full length of a macro
Date   Fri, 04 Mar 2005 08:42:35 -0500

Your wish is granted :)

Since Stata 8, you can get the length of a macro by using the macro extended function

local macrolen: length local macroname

I'm not sure why you need the index function given the variety of macro extended string functions available, especially the new(ish) family of macro list functions but also the subinstr, word count and word # functions.

type whelp macrolists and check out the functions there. Can you identify something you can't accomplish with the available functions?

Michael Blasnik
[email protected]


----- Original Message ----- From: "Fred Wolfe" <[email protected]>
To: <[email protected]>
Sent: Thursday, March 03, 2005 9:09 PM
Subject: st: Recognizing the full length of a macro



Stata SE allows a macro to have a length <= 1,081,511. However string functions including length() and index() don't recognize lengths greater than 245.

Perhaps recognizing the full length of macro could be added to the wish list. Until that time, however, I suggest this limitation be added to the help limits and help strfun files.

Fred Wolfe

Fred Wolfe
National Data Bank for Rheumatic Diseases
Wichita, Kansas
Tel (316) 263-2125 Fax (316) 263-0761
[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