(SOLVED) Comparing Pointers
Posted: Mon Mar 08, 2021 4:55 pm
This doesn't seem to work for me:
When I log the contents of the two variables of type Pointer they are identical:
Is there a way in LCB to compare two pointers to determine if they point to the same block of memory?
I looked at foundation.h header file but didn't notice anything like "MCPointerIsPointer()" that could be applicable.
Or maybe there's a way to dereference or coerce Pointers into another type that I can compare?
I think a way to convert Pointers to / from a String or a Number would be very useful in a few situations.
Code: Select all
if tPointerA is tPointerB then
...
Code: Select all
["Next Pointer=", <foreign pointer 0x7fac7c796260>, "Current Pointer =", <foreign pointer 0x7fac7c796260>]
I looked at foundation.h header file but didn't notice anything like "MCPointerIsPointer()" that could be applicable.
Or maybe there's a way to dereference or coerce Pointers into another type that I can compare?
I think a way to convert Pointers to / from a String or a Number would be very useful in a few situations.