Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!milton!nntp.uoregon.edu!nntp.uoregon.edu!stevev From: stevev@greylady.uoregon.edu (Steve VanDevender) Newsgroups: comp.sys.handhelds Subject: Re: What's the difference? Message-ID: Date: 27 Jun 91 01:39:22 GMT References: <1991Jun26.180439.6856@soph.cs.ubc.ca> Sender: news@ns.uoregon.edu Followup-To: comp.sys.handhelds Organization: University of Oregon Chemistry Stores Lines: 24 In-Reply-To: b2676870@soph.cs.ubc.ca's message of Wed, 26 Jun 1991 18:04:39 GMT >Consider the following fragment: > # 80000000 h SRB SRB SRB # C0 h AND # 80 h SAME >With word size > 32, the above evaluates to 1 (as expected). However, with >word size = 32, the above evalutes to 0. Why is this the case? I just tried this with word size == 64, and got a result of #80h that was a 16-nibble binary integer. With word size == 32, the result of #80h was an 8-nibble binary integer. They compare unequal with SAME because they are not the same object. They do compare the same with == because they do have the same value. This is reminiscent of the difference between (eq foo bar) and (equal foo bar) in LISP--eq compares the objects to see if they are the same (reside at the same address) while equal compares them to see if they evaluate to the same value. SAME compares the binary representation of the objects while == compares their visible values. -- Steve VanDevender stevev@greylady.uoregon.edu "Bipedalism--an unrecognized disease affecting over 99% of the population. Symptoms include lack of traffic sense, slow rate of travel, and the classic, easily recognized behavior known as walking."