comp.lang.ada
 help / color / mirror / Atom feed
* Beginner Question
@ 2010-10-20 21:41 SpoonThief
  2010-10-20 22:43 ` Jeffrey Carter
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: SpoonThief @ 2010-10-20 21:41 UTC (permalink / 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!



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-21  7:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-20 21:41 Beginner Question SpoonThief
2010-10-20 22:43 ` Jeffrey Carter
2010-10-20 22:45 ` Adam Beneschan
2010-10-21  7:28 ` Dmitry A. Kazakov

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