Jean_Benoit,
It is not clear to me whether your original `essai' input is fixed, or
being retrieved, but would something similar to the following work?:
tokenize `""01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21
22 23 24 25" " 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
46 47 48 49 50""'
local jb1 `1'
local jb2 `2'
local jb3 "`jb1' `jb2'"
disp "`jb1'" "`jb2'"
disp "`jb3'"
Buzz Burhans
At 11:29 AM 4/10/2004 +0200, you wrote:
I have a small problem to use macros in the return command of a program.
See the following program :
program define pgmmac, rclass
local essai 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
47 48 49 50
return local mac `essai'
end
then type
. pgmmac
. return list
macros:
r(mac) : "01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
44 45 46 47 48 49 50"
It's OK.
But if I want to save this macro r(mac) in an other macro I have a problem
(limit to 80 characters) :
. local jb=r(mac)
. di "`jb'"
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
26 2
. local jb r(mac)
. di "`jb'"
r(mac)
How solve this problem and to save all the characters of the macro r(mac)?
Thank you for your response
--
*****************************************************************************
Jean-Benoit Hardouin
37 rue Arrachart
41000 Blois
t�l : 02 54 45 39 75
email : [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/
Buzz Burhans
[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/