Semantics of Equals (was: Re: Question about checks for min and max values)

Jay R. Ashworth jra at baylink.com
Mon Jul 25 14:14:45 PDT 2005


On Mon, Jul 25, 2005 at 05:06:32PM -0400, Kenneth Brody wrote:
> > Maybe the smiley is the key, but that only works because they're exactly
> > identical--assuming it works.  One should be using strcasecmp() for
> > strings.
> 
> I guess it depends on your definition of "works".
> 
> The output is "They are not equal."  Yes, strcmp() will say that they
> compare equal, but "==" will not.
> 
> On the other hand, given:
> 
>     int num1 = atoi("0");
>     int num2 = atoi("");
> 
> the expression:
> 
>     num1 == num2
> 
> will be true.
> 
> :-)

Ok, now; no playing around with known syntactical breakage in the
competeing language to make your points... when there are civilians
watching.  :-)

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra at baylink.com
Designer                          Baylink                             RFC 2100
Ashworth & Associates        The Things I Think                        '87 e24
St Petersburg FL USA      http://baylink.pitas.com             +1 727 647 1274

      "...the rough cannot be mean and the love cannot be true, and that's
      as wise as I can get at 10 o'clock in the morning."
      	-- Bill Shatner, on being an anti-hero.


More information about the Filepro-list mailing list