Value of Null?

BlitzMax Forums/BlitzMax Beginners Area/Value of Null?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

This also reminds me of an issue with function pointers. Well, not an issue so much.

If you set a function pointer to Null, it doesn't become 0, it becomes the pointer to the Null() function. And because the Null() function is at some arbitrary address in memory, the function pointer actually holds a nonzero value which is the address of the Null() function. So if you test the value of a function pointer, you should test for Null, not for 0.