God, I feel like such a numpty! :) Of course a comparison to Null is the right way to do it. I think I got suduced by the original code that needed to actually print the pointer. Well, that's my excuse and I'm sticking to it! :P
Yes, from Floyd's code, this does indeed seem to be the case. This surprised me as I had no idea a comparison to Null in Blitz worked like this. It's been a while but I'm sure a comparison to NULL in C/C++ isn't this helpful. Thanks for the tip, Floyd! ;)
If I get it right, the comparison to Null actually checks if the pointer (that's stored in the array) in valid (points to a existing type-instance) and the Int-comparison just compares the integer-value of that pointer with 0 (and doesn't check if that pointer is a valid one).
Is this correct?
Is this correct?
Yes, from Floyd's code, this does indeed seem to be the case. This surprised me as I had no idea a comparison to Null in Blitz worked like this. It's been a while but I'm sure a comparison to NULL in C/C++ isn't this helpful. Thanks for the tip, Floyd! ;)