Empty VS null array?

ProgrammingGhost dsioafiseghvfawklncfskzdcf at sdifjsdiovgfdisjcisj.com
Thu Oct 17 16:12:02 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) {}

is null still treats [] as null. I tried && !is [] for fun and it 
didnt worth either (null is [])


More information about the Digitalmars-d mailing list