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

RE: st: newbie- syntax question

From   "Nick Cox" <>
To   <>
Subject   RE: st: newbie- syntax question
Date   Tue, 26 Aug 2003 18:21:40 +0100

Dimitriy V. Masterov
> In general, scalars do not need quotes around them.

Quite correct, but that makes the choice sound like 
a question of presentation style. 

A scalar with a temporary name, as in 

tempname foo 
scalar `foo' = 1 

will disappear at the end of the program it belongs to. 

A scalar with a permanent name will persist 
beyond the end of that program, unless dropped. 

scalar foo = 1 

Which is best depends on circumstance. On 
the whole, temporary scalars are perhaps better, 
as they impose less load on memory (usually trivial
in practice) and keep things defined only in a 
relevant namespace (often important in principle 
and practice). 


*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index