Is variable void?

rikki cattermole rikki at cattermole.co.nz
Sat Nov 25 15:38:12 UTC 2017


On 25/11/2017 3:34 PM, John Chapman wrote:
> Is there any way of determining whether a variable has been initialized 
> or not? For example, if something is declared like this:
> 
>    int x = void;
> 
> can I check if it's void before I use it, say, in a function it's been 
> passed to?

`` = void;`` isn't null.

Don't treat it as such. It is a low level detail where you _will_ 
initialize it, just in a smarter way.

There is no conditions tied directly to it.


More information about the Digitalmars-d-learn mailing list