Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Comparing Head' topicStudent Support Forum > General > "Comparing Head"

Next Comment >Help | Reply To Topic
Author Comment/Response
Ecchin
12/19/09 2:40pm

Hello. I hope you are all having a nice christmas pre-time.

I'm writing a function that takes a list as argument. It's not a simple list, it's actually a list of lists, a data structure I made. We have something like this:

{testee, {..}, {..}}

In my function, I try to test the type of data of "testee". I want to know whether it is symbol or integer. The problem is...:

In[95]:= Head[1] == Integer
Out[95]= True
(*This one is ok, but then...*)
In[96]:= Head[1] == String
Out[96]= Integer == String

Why won't he give me "False"? Have you guys run into this before? :/

Thank you very much in advanced.


URL: ,

Subject (listing for 'Comparing Head')
Author Date Posted
Comparing Head Ecchin 12/19/09 2:40pm
Re: Comparing Head yehuda ben-s... 12/22/09 03:30am
Re: Comparing Head Ecchin 12/29/09 6:20pm
Next Comment >Help | Reply To Topic