[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: macval() and passing text as is

From   "Salah Mahmud" <>
Subject   st: macval() and passing text as is
Date   Sun, 1 Jun 2008 12:39:49 -0500

Dear all,

I'm trying to save a string that may contain a Stata reserved
characters (eg $) into a text file.  The problem is Stata keep
intrepreting the string so the string "xx$Test" is interpreted into

I tried coding
  file write `rfhandle' `"`macval(rcmd)'"' _n
but this still does not work. I could not find a Help description of
macval. Is it still supported? Why the above line does not work?

rcmd in the above line is passed as an option to this ado file so
there is an Rmcd(string) in the syntax statement. My question when
does Stata interpret the string stored in rcmd? if this happen when
the ado is called then it might be too late to use the macval in the
ado body. If this is the case, is there away of passing the rcmd
option without interpretation? string asis does not seem to work. ?

Thanks for your help,

salah mahmud
*   For searches and help try:

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