Statalist The Stata Listserver


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

RE: st: How to prevent truncated string in macro expression


From   "Grealy, Patrick J" <Patrick.J.Grealy@uth.tmc.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: How to prevent truncated string in macro expression
Date   Tue, 11 Jul 2006 14:25:32 -0500

Thanks Austin, this works. I should have spotted that in the extended
functions. - Pat G.

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Austin
Nichols
Sent: Tuesday, July 11, 2006 2:17 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: How to prevent truncated string in macro expression

Patrick--
. local temp4 : subinstr loc varlist " " ",", all
see -help extended_fcn- for details.

On 7/11/06, Grealy, Patrick J <Patrick.J.Grealy@uth.tmc.edu> wrote:
> Hi,
> I am having trouble with the limit for string lengths in expressions
and
> have not been able to find the solution. I'm sure I've seen it
somewhere
> and suspect it involves using the colon(:) instead of equals(=)
method.
> Here's the relevant section of code from my .ado file for a program
> that, among other things, attempts to count the number of missings for
> any of the input variables:
>
> local temp4=subinstr("`varlist'"," ",",",.)
> quietly count if missing(`temp4') & `touse'

>>>>>>>>> snip-snip <<<<<<<<<<<<<<

*
*   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/



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