determining if array element is null

eastanon biorelated at gmail.com
Sat Jun 2 18:10:38 UTC 2018


Does D array implementation support an array of null values?

int a[4] = null;

But I ran into a type error while checking if a[i] is null

foreach(i; 0..3){
  if(i == null){
    writeln("it is null");
    }
   }
}

How do you set fixed size array of null values and check if they 
are null?




More information about the Digitalmars-d-learn mailing list