Re: Test if variable has void value

2018-08-22 Thread Rene Zwanenburg via Digitalmars-d-learn
On Wednesday, 22 August 2018 at 13:50:07 UTC, Andrey wrote: Hello, How to test if variable has void value? string text = void; if(text == void) { writeln("Is void"); } Tried this: if(is(text == void)) but doesn't work. You can't. When using a void initializer

Test if variable has void value

2018-08-22 Thread Andrey via Digitalmars-d-learn
Hello, How to test if variable has void value? string text = void; if(text == void) { writeln("Is void"); } Tried this: if(is(text == void)) but doesn't work.