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

Re: st: truncate list


From   Jhilbe@aol.com
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: truncate list
Date   Thu, 24 Mar 2005 18:52:58 EST

I believe that you can also use the  three backslash method when you 
are using version 8 and up programs. I used  it in a ML program yesterday 
when defining
a long log-likelihood function.  However, it will likely not work for 
programs that indicate a lower version. Use  like:

global set <blah blah>  .........     ///
<blah blah>  .....................     ///
<blah> ...
tempvar blah blah and on with the rest of the  program.

Joe Hilbe

============================
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 <montez@bu.edu>
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/  

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