       Re: confused about == vs === in this equality

• To: mathgroup at smc.vnet.net
• Subject: [mg103800] Re: confused about == vs === in this equality
• From: pfalloon <pfalloon at gmail.com>
• Date: Tue, 6 Oct 2009 08:02:50 -0400 (EDT)
• References: <20091003104738.LCJ3I.416659.imail@eastrmwml34>

```On Oct 6, 5:06 am, Daniel Lichtblau <d... at wolfram.com> wrote:
> d... at wolfram.com wrote:
> >> ?===
> >> lhs===rhs yields True if the expression lhs is identical to rhs,=
and
> >> yields
> >> False otherwise.
>
> >> ?==
> >> lhs==rhs returns True if lhs and rhs are identical.
>
> >> But looking at this example:
>
> >> a = ComplexInfinity;
> >>  If[a == ComplexInfinity, Print["YES"]]
>
> >> Expecting it would print "YES", but it does not. it just returns the w=
hole
> >> thing unevaluated? But
>
> >> If[a === ComplexInfinity, Print["YES"]]
>
> >> does return YES.
>
> >> I guess I am a little confused about the "expression" bit in the
> >> definition.
>
> >> So, when using the 3"=", it is looking at the _value_ of the express=
ion,
> >> but
> >> when using the 2"=", it is looking at the expression _as it is_, i.e=

```

• Prev by Date: Re: using fourier transforms in mathematica
• Next by Date: Re: Which is better, foo[n_Integer] or foo[n_?IntegerQ] ?
• Previous by thread: Re: confused about == vs === in this equality
• Next by thread: Re: Re: confused about == vs === in this equality