#Something like `nullptr`?
1 messages · Page 1 of 1 (latest)
*MyStruct, cannot be null, it will always point to something
if you want a nullable pointer, you need to use ?*MyStruct
I thought maybe it would be possible like in e.g. C++
1 messages · Page 1 of 1 (latest)
I saw that undefined is not comparable so the following code doesn't work:
// ...
var abc: *MyStruct = undefined;
if (MyStruct == undefined) {
// STUFF
}
// ...
So is there a way to check whether the pointer is available or not like nullptr?
Thanks!
*MyStruct, cannot be null, it will always point to something
if you want a nullable pointer, you need to use ?*MyStruct
I thought maybe it would be possible like in e.g. C++