Initialize to None

N.S. ns at null.com
Sun Sep 6 03:42:36 UTC 2020


I'd like to check whether a variable is initialized or not. And 
I'd also like to uninitialize a variable that is already 
initialized. Thanks!

int x = void;

if (x == void)
{
     writeln("x not initialized");
}
else
{
     // OK, use x
}

// Uninitialize x
x = void;



More information about the Digitalmars-d-learn mailing list