Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: AW: problem with -return macro-


From   Jeph Herrin <[email protected]>
To   [email protected]
Subject   Re: st: AW: problem with -return macro-
Date   Tue, 26 Jan 2010 08:55:11 -0500

Yes, if you look at my original post, I was doing the
"correct" thing inside the program and something else
outside it. So it should have been immediately obvious
to me why I was getting different output from the two
different -display-s.


cheers,
Jeph



Nick Cox wrote:
My interpretation is that Jeph's problem is entirely a matter of
-display- being required to evaluate an expression. The difference
between
. di r(test)

. di "`r(test)'"
is subtle, but bites here. In the first case, -display- is required to
do the work of evaluating r(test), regardless of the absence of an
equals sign. In the second case, the value of r(test) is substituted
before it is passed to -display- and the limit of 244 characters does
not bite. (See -help limits- for a list of limits.)
Both Jeph and Martin seem to realise this, but a one-paragraph summary
may be helpful to others. Nick [email protected]
Martin Weiss

Sorry, you are right. I mistook the output from the repeated -display-s
for
the returned value. But the truncation did come from limits imposed by
-display-, not from the returned value itself, right?


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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