If I have this in my .h
file:
int index;
And then in the .m
file I have:
if (index == nil)
There is no such thing as "nil" for ints. That's an object value. As for what variables are initialized to by default:
Note that the first rule above also applies to local object variables. They will not be nil-initialized for you. (Instance variables with object types will be, though.)