"Aaro Koskinen" a �crit dans le message news: pdx7kzd3fdb.fsf@sirppi.helsinki.fi... > "Jean-Pierre Rosen" writes: > > Still discovering how powerful Ada is... > > > > Imagine your program relies on Integer having a certain size, or being sure > > that the size of Integer is four times the size of character, or things like > > that, and you want to make sure that the program does not even compile if > > the assertions do not hold (because you hate fighting with a debugger). This > > is possible, since a static expression that raises constraint_error will not > > compile. > > I have been using a similar method in C. I have an assert macro, which > declares a const int with the value "1 / ". > If the assertion does not hold, it evaluates to 0, and the code will > not compile. > Out of curiosity... Is this *required* by the C standard ? -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr