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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.236.231.52 with SMTP id k50mr4284764yhq.52.1399479226316; Wed, 07 May 2014 09:13:46 -0700 (PDT) X-Received: by 10.182.196.104 with SMTP id il8mr225112obc.24.1399479226212; Wed, 07 May 2014 09:13:46 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!ih12no1227795qab.1!news-out.google.com!qf4ni19igc.0!nntp.google.com!c1no2646074igq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 7 May 2014 09:13:45 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=67.176.79.109; posting-account=eLk0BgoAAAA-yA75xm1L7heSizMaESVg NNTP-Posting-Host: 67.176.79.109 References: <9ac10bab-2ade-4ac8-a99b-336595e38f67@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <086f70f4-784b-4dd0-8b39-6e4815a378f3@googlegroups.com> Subject: Re: Noob question.. Autopromotion? From: jpwoodruff@gmail.com Injection-Date: Wed, 07 May 2014 16:13:46 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Received-Bytes: 2420 X-Received-Body-CRC: 4029385391 Xref: news.eternal-september.org comp.lang.ada:19737 Date: 2014-05-07T09:13:45-07:00 List-Id: On Tuesday, May 6, 2014 7:31:13 AM UTC-6, gautier...@hotmail.com wrote: > Hello, > > As Adam said, a figure read as a literal in the Ada source code and a figure read from a string from an user are different topics. Typically figures with or without .0 are valid (to GNAT and OA run-time libraries at least). > Perhaps you might benefit from some old (1987 vintage) work of mine that is useful for input of numeric (floating) values. "The packages Numeric_IO and Name_IO, together with their children and support, assist a program to read a user's input. The packages are intended to support numerical computation by providing Get and Put procedures for floating numbers and for vectors and matrices of floating numbers. "The procedures ease an end-user's burden in preparing inputs for computational programs. The rules for input of floating numbers are relaxed so that program inputs need not conform to the strict Ada syntax for floating numbers. Facilities allow input either from files or interactively. Consistent policies throughout all the services allow programs to address input errors, to prompt the end-user interactively or to specify optional default values." http://www.dmitry-kazakov.de/ada/Numeric-Name-IO.htm John