Empty VS null array?

deadalnix deadalnix at gmail.com
Thu Oct 17 16:04:12 PDT 2013


On Thursday, 17 October 2013 at 23:00:12 UTC, Adam D. Ruppe wrote:
> On Thursday, 17 October 2013 at 22:50:22 UTC, ProgrammingGhost 
> wrote:
>> How do I find out if null was passed in?
>
> try if(v is null) { use default }
>
> if all you care about is if there's contents, I like to use 
> if(v.length) {}

Which is ultimately wrong as equality shouldn't test for identity.


More information about the Digitalmars-d mailing list