From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: * X-Spam-Status: No, score=1.8 required=3.0 tests=BAYES_50,FREEMAIL_FROM, PDS_FROM_2_EMAILS autolearn=no autolearn_force=no version=3.4.6 X-Received: by 2002:ac8:5bc8:: with SMTP id b8mr4402776qtb.247.1636727568360; Fri, 12 Nov 2021 06:32:48 -0800 (PST) X-Received: by 2002:a25:e4c7:: with SMTP id b190mr17082597ybh.204.1636727568192; Fri, 12 Nov 2021 06:32:48 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 12 Nov 2021 06:32:48 -0800 (PST) Injection-Info: google-groups.googlegroups.com; posting-host=109.43.49.191; posting-account=3ciIaAoAAAA6pCfildcdAcuc3UQuirtL NNTP-Posting-Host: 109.43.49.191 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Beginners question From: "uq5huo...@gmail.com" Injection-Date: Fri, 12 Nov 2021 14:32:48 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:63111 List-Id: Hi, I'm beginning to play with Ada, and run into this with Ada.Text_IO; use Ada.Text_IO; procedure Learn is subtype Alphabet is Character range 'A' .. 'Z'; begin Put_Line ("Learning Ada from " & Alphabet'First & " to " & Alphabet'Last); end Learn; Now I want to play a bit with the code ... and this fails and I don't get why and how to solve. Put_Line ("Learning Ada from " & Alphabet'First & " to " & Alphabet'Last-1); or Put_Line ("Learning Ada from " & Alphabet'First & " to " & (Alphabet'Last-1)); Anyone more expirienced can explain this to my, please?