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

Re: st: truncate list


From   Paul Millar <[email protected]>
To   [email protected]
Subject   Re: st: truncate list
Date   Thu, 24 Mar 2005 16:11:40 -0700

Hello Maria,

You can do several things to make you command continue over several lines.  Here are two:

a) use comments to connect the lines:
global set2 "statetotgps99 statetotpsychs99 /*
   */   clin_psychol mh_sa_socwrk /*
   */	sa_mh_cnslrs"

b) assign a delimit character
#delimit ;
global set2 "statetotgps99 statetotpsychs99 
	clin_psychol mh_sa_socwrk 
	sa_mh_cnslrs";
#delimit cr

- Paul Millar
Sociology
University of Calgary


----- Original Message -----
From: Maria Montez <[email protected]>
Date: Thursday, March 24, 2005 3:18 pm
Subject: st: truncate list

> Hi!
> 
> Someone told me that if I split a list by typing /// where I 
> wanted it to
> split, then STATA wouldn't give me an error and I would be able to 
> see my
> entire list. Somehow this is not working (I'm using version 8). 
> I've shorten
> the variable names here. They are much longer in my actual program and
> that's why this would be very helpful.
> 
> So this is what I have written:
> 
> global set2 "statetotgps99 statetotpsychs99 ///
> 	clin_psychol mh_sa_socwrk ///
> 	sa_mh_cnslrs"
> 
> instead of writing:
> 
> global set2 "statetotgps99 statetotpsychs99 clin_psychol mh_sa_socwrk
> sa_mh_cnslrs"
> 
> Stata is giving me the following error:
> 
> .  global set2 "statetotgps99 statetotpsychs99 ///
> invalid syntax
> r(198);
> 
> Can someone tell me why I'm getting this error or if I should be using
> something else?
> 
> Thanks, Maria
> 
> *
> *   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