Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!news.kei.com!newsfeed.internetmci.com!in2.uu.net!harlequin.com!epcot!usenet
From: norvig@meteor.harlequin.com (Peter Norvig)
Subject: Re: (string-equal nil "nil") results in true
In-Reply-To: Erik Naggum's message of 21 Jan 1996 03:26:56 +0000
Message-ID: <NORVIG.96Jan23091159@meteor.harlequin.com>
Lines: 31
Sender: usenet@harlequin.com (Usenet Maintainer)
Nntp-Posting-Host: meteor.menlo.harlequin.com
Organization: Harlequin, Inc., Menlo Park, CA
References: <4doai2$btj@irz1.informatik.uni-kl.de> <19960121T032656Z@arcana.naggum.no>
Date: Tue, 23 Jan 1996 17:11:58 GMT



[Sylvio Tabor]

|   Why does string-equal not result like string= ?
|   (string= nil "nil") => NIL
|   
|   Any other implementations which follow the behaviour above?
|   Any reasons for that?

string-= compares characters exactly, ("N" and "n" are different),
while string-equal is more forgiving ("N" and "n" are the same).
The symbol-name of nil is "NIL".


CL-USER 1 > (string= nil "nil")
NIL

CL-USER 2 > (string= nil "NIL")
T

CL-USER 3 > (string-equal nil "NiL")
T

CL-USER 4 > (symbol-name nil)
"NIL"
-- 
Peter Norvig                  | Phone: 415-833-4022           FAX: 415-833-4111
Harlequin Inc.                | Email: norvig@harlequin.com
1010 El Camino Real, #310     | http://www.harlequin.com
Menlo Park CA 94025           | http://www.cs.berkeley.edu/~russell/norvig.html
