Mercurial > hg > xemacs-beta
comparison man/lispref/objects.texi @ 4472:a99eb40f0b5b
Correct an omitted word, expand on bignum equality in the lispref.
2008-05-29 Aidan Kehoe <kehoea@parhasard.net>
* lispref/objects.texi (Equality Predicates):
Expand on bignum equality; correct an omitted word in the last
commit.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Thu, 29 May 2008 18:53:45 +0200 |
parents | 2d39535e1f9d |
children | f9104f0e9b91 |
comparison
equal
deleted
inserted
replaced
4471:2d39535e1f9d | 4472:a99eb40f0b5b |
---|---|
2245 the same object, @code{nil} otherwise. The ``same object'' means that a | 2245 the same object, @code{nil} otherwise. The ``same object'' means that a |
2246 change in one will be reflected by the same change in the other. | 2246 change in one will be reflected by the same change in the other. |
2247 | 2247 |
2248 @code{eq} returns @code{t} if @var{object1} and @var{object2} are | 2248 @code{eq} returns @code{t} if @var{object1} and @var{object2} are |
2249 integers with the same value. It is preferable to use @code{=} or | 2249 integers with the same value. It is preferable to use @code{=} or |
2250 @code{eql} in many contexts for numeric comparison; @pxref{Comparison of | 2250 @code{eql} in many contexts for numeric comparison, especially since |
2251 Numbers}. @code{eq} also returns @code{t} if @var{object1} and | 2251 bignums (integers with values that would have otherwise overflowed, only |
2252 @var{object2} are identical characters, though in this case you may | 2252 available on some builds) with the same value are not @code{eq}; |
2253 prefer to use @code{char=}. | 2253 @pxref{Comparison of Numbers}. @code{eq} also returns @code{t} if |
2254 @var{object1} and @var{object2} are identical characters, though in this | |
2255 case you may prefer to use @code{char=}. | |
2254 | 2256 |
2255 Also, since symbol names are normally unique, if the arguments are | 2257 Also, since symbol names are normally unique, if the arguments are |
2256 symbols with the same name, they are @code{eq}. For other types (e.g., | 2258 symbols with the same name, they are @code{eq}. For other types (e.g., |
2257 lists, vectors, strings), two arguments with the same contents or | 2259 lists, vectors, strings), two arguments with the same contents or |
2258 elements are not necessarily @code{eq} to each other: they are @code{eq} | 2260 elements are not necessarily @code{eq} to each other: they are @code{eq} |
2262 not interned in the standard @code{obarray}. When uninterned symbols | 2264 not interned in the standard @code{obarray}. When uninterned symbols |
2263 are in use, symbol names are no longer unique. Distinct symbols with | 2265 are in use, symbol names are no longer unique. Distinct symbols with |
2264 the same name are not @code{eq}. @xref{Creating Symbols}.) | 2266 the same name are not @code{eq}. @xref{Creating Symbols}.) |
2265 | 2267 |
2266 NOTE: Under XEmacs 19, characters are really just integers, and thus | 2268 NOTE: Under XEmacs 19, characters are really just integers, and thus |
2267 characters and integers with the same numeric are @code{eq}. Under | 2269 characters and integers with the same numeric code are @code{eq}. Under |
2268 XEmacs 20, it was necessary to preserve remnants of this in function | 2270 XEmacs 20, it was necessary to preserve remnants of this in function |
2269 such as @code{old-eq} in order to maintain byte-code compatibility. | 2271 such as @code{old-eq} in order to maintain byte-code compatibility. |
2270 Byte code compiled under any Emacs 19 will automatically have calls to | 2272 Byte code compiled under any Emacs 19 will automatically have calls to |
2271 @code{eq} mapped to @code{old-eq} when executed under XEmacs 20. | 2273 @code{eq} mapped to @code{old-eq} when executed under XEmacs 20. |
2272 | 2274 |