From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00,FROM_NUMERIC_TLD, INVALID_MSGID,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d7ae8269a4ecf7c4 X-Google-Attributes: gid103376,public From: steved@pacifier.com@199.2.117.163 (Steve Doiel) Subject: Re: Prevalence of Compilers for Which Integer'Size < 32? Date: 1996/07/28 Message-ID: <4tg4eq$qj1@news.pacifier.com>#1/1 X-Deja-AN: 170823068 references: <4tdp24$5h1@news.pacifier.com> organization: Pacifier BBS, Vancouver, Wa. ((360) 693-0325) reply-to: steved@pacifier.com (Steve Doiel) newsgroups: comp.lang.ada Date: 1996-07-28T00:00:00+00:00 List-Id: Dave Marshall writes: >My specific question revolves around something such as this example >that you'll find in a lot of time-handling packages. > >type Seconds_In_A_Day is range 0 .. 86_400; > >This is going to work fine for compilers for which Integer'Size is 32, >but it will fail for compilers for which Integer'Size = 16. Of >course, this is because the above statement is equivalent to > >type some_anonymous_integer_type is new Integer; >subtype Seconds_In_A_Day is some_anonymous_integer_type range 0 ..86400; > >If Integer'Last is 65535, ka-bloowie. I certainly do not expect this behaviour. I expect the compiler to choose a suitably sized integer representation (perhaps a long integer) to represent the range given. If no such representation exists then I expect some sort of a "not supported by this implemetation" error. Steve Doiel