How to initialise array of ubytes?

Daniel Kozak via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Nov 29 14:08:22 PST 2014


On Saturday, 29 November 2014 at 20:45:34 UTC, bearophile wrote:
> Daniel Kozak:
>
>> http://stackoverflow.com/questions/24600796/d-set-default-value-for-a-struct-member-which-is-a-multidimensional-static-arr/24754361#24754361
>
> Do you also know why the simplest syntax doesn't work? Can't it 
> be implemented and added to the D language?
>
> Bye,
> bearophile

I don't know. But this works too:

module main;
import std.stdio;

int[5][5] p;

static this() {
	p = 1;
}

void main() {
	writeln(p);
}


More information about the Digitalmars-d-learn mailing list