[Agh! I'm used to groups that automatically change the reply-to address!
Apologies to all the messages I'm only sending to individual people. I'm not
used to this yet...]
On 8/6/01 10:33 AM, Brett W. McCoy wrote:
> On Mon, 6 Aug 2001, CDitty wrote:
>
>> The subject pretty much says it all. Why do some if statements only want
>> to work with eq and others will work with ==?
>
> == and != are only for compating numerical values; eq and ne are used for
> comparing string values.
>
> That's what the difference is.
>
> -- Brett
To elaborate, all strings have a numerical value of 0. So ("foo" == 0) is
true, but ("foo" eq "0") isn't. Also, == will correctly figure out that
(1.00 == 1) is true while eq will not. (1.00 and 1 are equal numerically,
but are not the same string.)
-Michael
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]