"Wilhelm Spickermann" wrote in message news:mailman.1005833842.603.comp.lang.ada@ada.eu.org... Hi, I would like to get a compilation *error*, if some compile time constant is not suitable for the algorithm in use. Example: Chunk_Bits : constant := Integer'Min (32, System.Max_Binary_Modulus / 2); type Check is (Checkitem1, Checkitem2); for Check'SIZE use 1 - Integer'MIN (96 mod Chunk_Bits, 1); The last two lines result in a compilation error, if and (I hope) only if 96 is not a multiple of Chunk_Bits. That�s what I want -- but it�s really ugly. Does anyone have something better? Could try: type A_Valid_Range is range 0 .. 0; My_Check : constant A_Valid_Range := A_Valid_Range (96 mod (Integer'Min (32, System.Max_Binary_Modulus / 2))); This will probably raise a warning rather than an error though. Some compilers will let you specify that warning are to be treated as errors.