On Sunday, 6 September 2020 at 05:06:26 UTC, starcanopy wrote:
On Sunday, 6 September 2020 at 03:42:36 UTC, N.S. wrote:
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)
On Sunday, 6 September 2020 at 03:42:36 UTC, N.S. wrote:
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
}
On Sunday, 6 September 2020 at 03:56:51 UTC, Steven Schveighoffer
wrote:
On 9/5/20 11:42 PM, N.S. wrote:
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)
There isn't a
On 9/5/20 11:42 PM, N.S. wrote:
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)
There isn't a way to check this.
{
writeln("x not initialized");
}
else
{
//