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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8dd8ee71ca4e5206 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-07 12:44:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!newsfeed.news2me.com!border1.nntp.aus1.giganews.com!nntp2.aus1.giganews.com!nntp.giganews.com!newsfeed1.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3DA1E3FF.3090701@acm.org> From: Jeffrey Carter User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Newbie question on Ada TExt_IO References: <93d4dcd4.0210031020.b0cca2b@posting.google.com> <3D9DF4DC.4000105@acm.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 07 Oct 2002 19:44:15 GMT NNTP-Posting-Host: 63.184.105.107 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 1034019855 63.184.105.107 (Mon, 07 Oct 2002 12:44:15 PDT) NNTP-Posting-Date: Mon, 07 Oct 2002 12:44:15 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:29569 Date: 2002-10-07T19:44:15+00:00 List-Id: Fraser Wilson wrote: > Jeffrey Carter writes: > >>subtype Valid_Number is Integer range 1 .. 6; >>N : Valid_Number; >>... >>N := Integer'Value (Input (Input'First .. Last) ); > > Should this be > > N := Valid_Number'Value (Input (Input'First .. Last)); The ARM defines 'Value as For every scalar subtype S: S'Value denotes a function with the following specification: function S'Value(Arg : String) return S'Base Since Valid_Number'Value returns Valid_Number'Base, and Valid_Number is a subtype of Integer, the 2 are equivalent. -- Jeff Carter "Have you gone berserk? Can't you see that that man is a ni?" Blazing Saddles