> Matthew Heaney wrote: > > With respect to the base range of the type, how do the declarations > > > > type T is new Integer range 1 .. 100; > > type T is range 1 .. 100; > > > > differ from one another? For the first, the base type is derived from Integer'Base. So T'Base'First = Integer'Base'First. OTOH, all we know about the second T is that T'First <= -100, and T'Last >= 100. (Generally, it is some power of two). Thus, the second gives more power to the compiler, and thus is preferred. For instance, Janus/Ada has historically used Integer'Size = 16 (that kept all of our compilers compatible -- probably a bad choice, but it is impossible to change without breaking a lot of user code). type T1 is Integer range 0 .. 100_000; -- Raises Constraint_Error on most versions of Janus/Ada; will work on GNAT, etc. type T2 is range 0 .. 100_000; -- Works fine on all modern versions of Janus/Ada. Randy. > Look at the output from the program I provided. In the first case, the > base type has the same characteristics as Integer'Base. In the second > example, look at the results of the program I ran. The compiler can > choose any predefined integer type for the base type. In this case, > GNAT choose one with a range -128..127. > -- > > Robert I. Eachus > > �In an ally, considerations of house, clan, planet, race are > insignificant beside two prime questions, which are: 1. Can he shoot? 2. > Will he aim at your enemy?� -- from the Laiden novels by Sharon Lee and > Steve Miller. >