So, I am creating a new instance of a ref object.
If I do echo repr(obj), I get something like this:
ref 0x10ba54390 --> [...object fields...]
How can I get this "0x10ba54390" into a string? (I tried with addr, etc - but I'm confused...)
Or repr(addr(obj))
Or similar
I still have issues...
I have some ref objects and trying to get the hex address of the objects using repr(addr(x)) but when trying to echo the value the output is ... whitespace(!).
Is it possible that it has sth to do with my configuration and/or compilation options? I cannot explain it otherwise...
Thanks a lot!
This worked beautifully:
fmt"{cast[int](addr(OBJ)):#x}"