|
|
|
||||
|
|
|||||
Single Equal -- set equal
The single equal, =, is used as a set equal operator. Old time
Pascal programmers will recognize it as, :=.
It is used in
the generate, replace and recode commands. Examples:
The single equal is also used in some of the multivate commands, such as, mvreg and manova.
Examples:
Double Equals -- test for equality
The double equals, ==, is used to test for equality. It is sometimes called logical equals because
it is part of a logical test that returns either a one (true) or a zero (false). Here are
some examples:
The double equals can also be used in an if command in a do-file or ado-file.
Example:
You can create some interesting statements that have both a single equal and double equals. For
example,
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services