Salah--
as Ben points out, the place to intervene is upstream where the macro
is created:
file close _all
tempfile tmp
file open t using `tmp', write
loc rcmd "xx$Test"
file write t `"`macval(rcmd)'"' _n
loc rcmd "xx\$Test"
file write t `"`macval(rcmd)'"' _n
file close _all
type `tmp'
On Sun, Jun 1, 2008 at 4:35 PM, Ben Jann <[email protected]> wrote:
> On Sun, Jun 1, 2008 at 8:58 PM, Salah Mahmud <[email protected]> wrote:
>> If I understood you correctly, there is nothing that could be done
>> from within an ado module to overcome the problem. So it would be up
>> to the user of the ado to pass any $-containing arguments within a
>> macval() call.
>
> ... or use the "\" macro exapansion escape character. Example:
>
> . myprog, option(blah\$blah)
>
> would preserve the $ (provided that macval() is used throughout in -myprog-).
>
> ben
*
* 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/