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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,685d80ec307a0c,start X-Google-Attributes: gid103376,public From: Philippe Torres Subject: use of attribute Pos Date: 2000/10/11 Message-ID: <39E4A08D.B454CB1C@laas.fr>#1/1 X-Deja-AN: 680220866 Content-Transfer-Encoding: 7bit X-Accept-Language: fr-FR,en Content-Type: text/plain; charset=us-ascii X-Complaints-To: postmaster@cict.fr X-Trace: news.cict.fr 971284620 22349 140.93.144.128 (11 Oct 2000 17:17:00 GMT) Organization: Inconnue Mime-Version: 1.0 NNTP-Posting-Date: 11 Oct 2000 17:17:00 GMT Newsgroups: comp.lang.ada Date: 2000-10-11T17:17:00+00:00 List-Id: Hi, do you think the following behaviour is normal ? ----- subtype Upper is character range 'A'..'Z' ; begin Put(Upper'Pos('A')) ; ----- Output : 65 I was expecting 0 since 'A' is the first element of Upper but i got the ranking of 'A' in the Character type. What's the point of defining constrained subtype if we can't use the attributes on it ? Or am i missing something ? I use gnatmake to compile. Philippe