Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: problem with a macro


From   "Maarten Buis" <[email protected]>
To   <[email protected]>
Subject   st: RE: problem with a macro
Date   Tue, 20 Dec 2005 14:08:25 +0100

Abdelrahmen:
It works if you change -global D wordcount($demographe)-  into - global D wordcount("$demographe") -
HTH,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology 
Vrije Universiteit Amsterdam 
Boelelaan 1081 
1081 HV Amsterdam 
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214 

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of U.A.QU.AP
Sent: dinsdag 20 december 2005 15:11
To: [email protected]
Subject: st: problem with a macro


 When I type
global demographe "one NE SOUTH MIDWEST sex_c age_c kids05
kids610 kids1115 voiture maison" ;
then
global D wordcount($demographe) ;
I expect that stata returns the number 11
but I get the folowing message when I type
dis $D
oneNESOUTHMIDWESTsex_cage_ckids05kids610kids1115voituremaison
invalid name
any help
many thanks
Abdelrahmen
*
*   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/

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index