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_20,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c9f437cff8842e,start X-Google-Attributes: gid103376,public From: Alex Subject: Enumeration representation Date: 1999/09/10 Message-ID: <37D8E3BC.175DB72C@newtech.it>#1/1 X-Deja-AN: 523336390 Content-Transfer-Encoding: 7bit Organization: Centro Servizi Interbusiness X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-09-10T00:00:00+00:00 List-Id: 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