TypeQ

TypeQ[expr, type]
allows one to check out the type of needed expression.
  • expr - any expression.
  • type - type of the expr.
In[1]:=
Click for copyable input
Declare some constants:
In[2]:=
Click for copyable input
Out[2]=
Verify that C is a constant using TypeQ procedure:
In[3]:=
Click for copyable input
Out[3]=
Declare some vectors:
In[4]:=
Click for copyable input
Out[4]=
Verify that i is vector using TypeQ procedure:
In[5]:=
Click for copyable input
Out[5]=
Declare some forms:
In[6]:=
Click for copyable input
Out[6]=
Verify that is p-form using TypeQ procedure:
In[7]:=
Click for copyable input
Out[7]=
Obviously:
In[8]:=
Click for copyable input
Out[8]=
But:
In[9]:=
Click for copyable input
Out[9]=