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.6 required=5.0 tests=BAYES_40,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c9f437cff8842e X-Google-Attributes: gid103376,public From: Alex Subject: Re: Enumeration representation Date: 1999/09/13 Message-ID: <37DCA2C7.EAB603AE@newtech.it>#1/1 X-Deja-AN: 524363532 Content-Transfer-Encoding: 7bit References: <37D8E3BC.175DB72C@newtech.it> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Centro Servizi Interbusiness Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-09-13T00:00:00+00:00 List-Id: Thank you very much for your answers. Ciao, Alessandro Alex wrote: > I've written the following example program for testing enumeration > represetantion clause: > > with Ada.Text_IO; use Ada.Text_IO; > > procedure MainEnum is > > type Status is (a,b,c,d,e); > pragma Discard_Names(Status); > > for Status use > ( a => 0, > b => 20, > c => 400, > d => 800, > e => 1600); > > S : Status; > begin > S := b; > Put(" => " & S'img); > end MainEnum; > > I've compiled it with Gnat (the latest version) > the output of program is 1 but I was expecting another value : 20. > Does Gnat support this clause? > Did I use this clause badly? > > Thank you very much, > by > Alessandro Busato > busato@newtech.it