"J-P. Rosen" wrote in message news:lrfh8k$rpi$1@dont-email.me... > Le 01/08/2014 04:12, Randy Brukardt a écrit : >> t's annoying that we couldn't get this "explicit default-initialization" >> syntax more widely used. I prefer to ensure that everything is properly >> initialized, but sometimes the default value is good enough. It would be >> nice to be able to specify that: >> >> Obj : My_Type := <>; >> or maybe >> Obj : My_Type := (<>); >> >> so that I could verify that every object is either initialized or >> explicitly >> left default initialized. > > One of my clients has a rule that every user-defined type must provide > an associated constant for the default value (and of course, AdaControl > can enforce that rule). Then it is enough to say that every variable > must be initialized. > > Seems close enough to what you want... Not quite, since Default_Frobnitz : constant Frobnitz_Type; is illegal. You could write: Junk_Frobnitz : Frobnitz_Type; -- To get this default-initialized. Default_Frobnitz : constant Frobnitz_Type := Junk_Frobnitz; but that's awful. Randy.