Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: {smcl} link problem
From
Matthew White <[email protected]>
To
[email protected]
Subject
Re: st: {smcl} link problem
Date
Thu, 6 Jun 2013 14:38:19 -0400
Dear Sergiy,
I'm using Stata 12.1, and it seems to me that the limit might be 254 characters:
forvalues i = 1/265 {
display as res `i'
local x : display _dup(`i') "x"
display "{stata `x'}"
}
I'm not sure where that limit comes from. A workaround might be to put
the command in a do-file or program, and then have the {stata}
directive execute the do-file/program rather than the command. For
example, in -help graph pie-, the "click to run" links don't run the
actual long commands, but instead run a program that contains the
commands (-gr_example2-).
Best,
Matt
On Tue, Jun 4, 2013 at 4:13 PM, Sergiy Radyakin <[email protected]> wrote:
> Dear All,
>
> I don't know which limit from 'help limits' is applicable in this
> case, but it seems that ~244 is rather a small number here. I would
> imagine that "# of characters in a command" is more suitable.
> In the following code snippet the smcl link gets corrupted after the
> link text becomes too long (in my code the list supplied to the link
> is list of different variables of course):
>
> * * * * * * * * * * * * * * * * * *
> * * * * * * * * * * * * * * * *
> mata
>
> adjvars=""
> for(v=1;v<=99;v++) {
> v
> adjvars=adjvars+" x12345"
> printf("{text}Message: {stata " + `"""' + "describe " +
> adjvars+`"":"'+"INFO"+"}")
> ""
> }
>
> end
> * * * * * * * * * * * * * * * * * *
> * * * * * * * * * * * * * * * *
> Can somebody please confirm that 244 is indeed an intended and
> unavoidable limit on such a link size, or is it a bug and is there a
> workaround?
>
> Stata 12/MP/Windows
>
> Thank you, Sergiy Radyakin
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
--
Matthew White
Senior Project Associate
Innovations for Poverty Action
101 Whitney Avenue, New Haven, CT 06510 USA
www.poverty-action.org
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/