Checking for null
obj(object).
if(obj):{...}
This gets fooled by objects named 0xf84c128 really any object that starts with 0. Should this version of the same code alleviate the problem?
obj(object).
if(obj != 0):{...}
I am assuming that we have all have reasons to test for the existence of objects which may be named with the "0" character in the first position.
»
Submitted by ckowall on Tue, 2008-06-17 15:36.
- Login to post comments

I don't think there's a
I don't think there's a problem here -- the object test returns false if EITHER the object is null OR if it's a pointer to a freed object. I think this probably what you're seeing.
All objects when printed out start with "0x", as the pointers are printed out in hex.
- jon
Thanks
Thank you for the prompt response! You were right I was neglecting to initialize the object in a couple cases.