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

Re: st: problem with a macro


From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: st: problem with a macro
Date   Tue, 20 Dec 2005 08:08:21 -0500

At 09:10 AM 12/20/2005, U.A.QU.AP wrote:
hello,
I have a problem with the syntaxe global
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
Try this:

. global D: word count $demographe

. dis $D
11



-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
*
* 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