val.init

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Tue Oct 1 19:10:28 PDT 2013


I thought variable.init was different from T.init and gave the value of
the explicit initializer if one was used. Was I mistaken?:

import std.stdio;
void main()
{
	int a = 5;
	writeln(a.init); // Outputs 0, not 5
}



More information about the Digitalmars-d-learn mailing list