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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,68ab861309518ae8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-19 22:22:33 PST Path: supernews.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!194.213.69.151!news.algonet.se!newsfeed1.telenordia.se!algonet!uab.ericsson.se!erinews.ericsson.se!news.emw.ericsson.se!not-for-mail Message-ID: <3ADFC797.7D2D537D@emw.ericsson.se> From: Sven Nilsson Reply-To: sven.nilsson@emw.ericsson.se Organization: Ericsson Microwave Systems AB X-Mailer: Mozilla 4.75C-EMW [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: enumration using integers? References: <3ADEC4E8.954B6830@emw.ericsson.se> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 20 Apr 2001 07:22:31 +0200 NNTP-Posting-Host: 136.225.182.69 X-Trace: news.emw.ericsson.se 987744151 136.225.182.69 (Fri, 20 Apr 2001 07:22:31 MET DST) NNTP-Posting-Date: Fri, 20 Apr 2001 07:22:31 MET DST Xref: supernews.google.com comp.lang.ada:7025 Date: 2001-04-20T07:22:31+02:00 List-Id: Ted Dennison wrote: > > It understands perfectly what you want. It just won't allow you to do that. :-) I knew it! The machines are revolting!! Well, this machine is gonna be playing Britney Spears MP3's the whole day... Take that you ungreatful piece of ... > > The next obvious question is *why* do you want to do this? What are you trying > to accomplish with an enumeration of integers? > Right. I want to have a type containing certain integers that I can use in calculations. Something like this: type Distance is (10, 15, 20, 37); Dist : Distance := 15; Result : Integer := 0; begin Result := Some_Formula * Dist; -- And perhaps a typecast if need be. I could do that in other ways, for instance as suggested by Marc and Philip, but that's not really the issue. I wanted to know if I could magically write something to make my type-construct legal. Which I probably can't. *sob* -Sven