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

st: problem with -return macro-

From   Jeph Herrin <[email protected]>
To   [email protected]
Subject   st: problem with -return macro-
Date   Mon, 25 Jan 2010 11:52:00 -0500

I thought I understood this, but maybe I'm just making
an obvious typo. When I run the following

************* test ***************
program define test, rclass
	version 11
	local rlist
	forv i=1/40 {
		local text "text`i'"
		local rlist `rlist' `text'
	di "`rlist'"
	return local test `"`rlist'"'

di r(test)

Why is -rlist- truncated to 244 chars in the return list? I have
tried this a number of different ways (I guess I have never tried
to return a long string before?); I thought as long as I used
macro copy rather than evaluate, macros would not get truncated.
I have tried many variations on the -return- assignment, but this
is the one explicitly recommended on [P] page 340.


*   For searches and help try:

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