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]
st: Equals: why the "=" (attribution) vs. "==" (Boolean) syntax distinction ???
From
Lucas Ferreira Mation <[email protected]>
To
statalist <[email protected]>
Subject
st: Equals: why the "=" (attribution) vs. "==" (Boolean) syntax distinction ???
Date
Tue, 27 Aug 2013 13:59:37 -0300
sort of a philosophical question (and I could not find any previous
discussion on this topic in the list):
why does Stata the language differentiate between "=" and "==" ?
I was teaching a Intro to Stata Class and the students were asking
about it. I explained the difference between attribution equal (=) and
Boolean check equal (==).
Although they got the concept, the question remains:
why be explicit about this distinction in the language syntax?
Thinking about it, it seems to me that the occurrences of "equal"
(attribution vs. Boolean) aways appear in distinct places in the
syntax, so it does not seem prone to mistakes.
On the other hand, forgetting "==" it the single most common mistake
beginner users make, and even more advanced users ofter forget.
Anyway, I just wanted to know if there are other reasons I'm unaware of.
Lucas
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/