MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Head logic


There are times when === is your friend, rather than ==.

Bobby

On Tue, 03 Mar 2009 04:55:49 -0600, <carlos at colorado.edu> wrote:

> Entering
>
>    ClearAll[r];
>    Head[r]
>    Head[r]!=Symbol
>    Head[r]==Symbol
>
> give Symbol, False and True as expected. But
>
>    Head[r]==Integer
>
> evaluates to Symbol==Integer. Why not False?
> Head[r] is certainly not Integer. Likewise
>
>   r=4;
>   Head[r]==Integer
>   Head[r]!=Symbol
>   Head[r]==Symbol
>
> give True (correct) but  Integer!=Symbol and Integer==Symbol.
> Why not True and False?
>



-- 
DrMajorBob at bigfoot.com


  • Prev by Date: question about mathlink.h
  • Next by Date: Re: Hasse Diagram
  • Previous by thread: Head logic
  • Next by thread: Re: Head logic