March 19, 2005 Error: array initializers as expressions are not allowed - no file/line numbers | ||||
|---|---|---|---|---|
  | ||||
The subject says it all. Test code:
import std.stdio;
void main()
{
	static int[]  array1 = [0,1,2,3];
	static int[4] array2 = [4,5,6,7];
	
	writefln(typeid(typeof(array1.init)));
	writefln(typeid(typeof(array1[].init)));
	writefln(typeid(typeof(array2.init)));
	writefln(typeid(typeof(array2[].init)));
}
Regan
 | ||||
March 19, 2005 Re: Error: array initializers as expressions are not allowed - no file/line numbers | ||||
|---|---|---|---|---|
  | ||||
Posted in reply to Regan Heath  | Shortened test case:
import std.stdio;
void main()
{
	static int[4] array2 = [5,6,7,8];		
	writefln("array2.init = ",typeid(typeof(array2.init)));
}
Regan
 | |||
Copyright © 1999-2021 by the D Language Foundation
 
Permalink
Reply