comp.lang.ada
 help / color / mirror / Atom feed
From: SpoonThief <spoonthief@gmail.com>
Subject: Beginner Question
Date: Wed, 20 Oct 2010 14:41:08 -0700 (PDT)
Date: 2010-10-20T14:41:08-07:00	[thread overview]
Message-ID: <90ceb514-83aa-44c2-b253-218956d8426d@d17g2000yqm.googlegroups.com> (raw)

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!



             reply	other threads:[~2010-10-20 21:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20 21:41 SpoonThief [this message]
2010-10-20 22:43 ` Beginner Question Jeffrey Carter
2010-10-20 22:45 ` Adam Beneschan
2010-10-21  7:28 ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox