Hi, I would like to know how to return output from a program back to the rest of the do-file. I'm working with strings, so I don't think the 'return' command is what I need. I'm trying to use a local macro. Do I need to use a global macro? Here's what I'm trying:
*Stata v. 11.2
program define mytest
display "Currently on `1'"
local text_rename = subinstr("`1'", ":", "_", .)
display "Changed to `text_rename'"
end
mytest "hello:"
display "`text_rename'"
Thanks
*Stata v. 11.2
program define mytest
display "Currently on `1'"
local text_rename = subinstr("`1'", ":", "_", .)
display "Changed to `text_rename'"
end
mytest "hello:"
display "`text_rename'"
Thanks
Comment