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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,7776df5b2a2fcc30,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!postnews.google.com!d17g2000yqm.googlegroups.com!not-for-mail From: SpoonThief Newsgroups: comp.lang.ada Subject: Beginner Question Date: Wed, 20 Oct 2010 14:41:08 -0700 (PDT) Organization: http://groups.google.com Message-ID: <90ceb514-83aa-44c2-b253-218956d8426d@d17g2000yqm.googlegroups.com> NNTP-Posting-Host: 134.161.75.7 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1287610983 9851 127.0.0.1 (20 Oct 2010 21:43:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 20 Oct 2010 21:43:03 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d17g2000yqm.googlegroups.com; posting-host=134.161.75.7; posting-account=J0si1AoAAAD21CVBxiZVaar8NMasegax User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:15605 Date: 2010-10-20T14:41:08-07:00 List-Id: So, I have a question that may seem painfully obvious, but how does one go about parsing a Float from a string that has other data in it too? I'm getting a line from the keyboard that has a float and a custom type in it, and I need to separate the two values. I'm using a call to Get_Line to get the entire line the user entered as a string, and when I try to call Float'Value (In_String (1 .. Last)), I get a constraint error. Is there any way to parse a float and a custom subtype (Excellent, Good, Fair, Poor) from one string, or am I going about this the entirely wrong way? Any help would be much appreciated, and if clarification is needed because I wasn't clear, just ask. Thank you in advance!