Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: RE: RE: scalar do not allow -if-
From 
 
Maarten buis <[email protected]> 
To 
 
[email protected] 
Subject 
 
Re: st: RE: RE: scalar do not allow -if- 
Date 
 
Wed, 17 Nov 2010 16:33:44 +0000 (GMT) 
--- Nick wrote:
> the code here optimistically assumes no clash between scalar
> and variable names. 
>
> Wrapping with -scalar()- means being always safe and never
> sorry. 
An alternative solution that I often prefer (mostly because 
I am used to it) is:
tempname w1 w2 w3
scalar `w1' = ...
scalar `w2' = ...
scalar `w3' = ...
Hope this helps,
Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
      
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/