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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: 'Size hack for enumerated types Date: Mon, 07 Jul 2014 08:45:06 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx05.eternal-september.org; posting-host="117da9042fa4d6f5956a9b8f72035635"; logging-data="6398"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LEOMQ+zlV3SdvuYjGBeRfMNsL78r3VKY=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:fNkSw0RgZvc4llXdlM9YUtkGn0o= sha1:USHViifUpbfECT69ww3EsWxjkNA= Xref: news.eternal-september.org comp.lang.ada:20765 Date: 2014-07-07T08:45:06+01:00 List-Id: Victor Porton writes: >> If you want Enum_Type to be an enumeration, you should use a formal >> discrete type definition[1]: >> >> type Enum_Type is (<>); > > The same error with this. I never said that that change would fix the problem with your implementation; but whatever the implementation, you can't instantiate your generic with an enumeration because an enumeration is not a signed integer. > BTW, remind me what is the difference of: > - type Enum_Type is range <>; > - type Enum_Type is (<>); > ? I already gave you a link to the ARM: http://www.ada-auth.org/standards/12rm/html/RM-12-5-2.html#p2