comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Convert ASCII numerals to Integer numbers
Date: Sun, 05 Aug 2001 18:15:24 GMT
Date: 2001-08-05T18:15:24+00:00	[thread overview]
Message-ID: <03gb7.32954$Kd7.20393412@news1.rdc1.sfba.home.com> (raw)
In-Reply-To: o12rmtgicuk8gav9qo7u4o5p432l58a2h9@4ax.com

>link asdf12 asdf23 25
>
>I pickup the 25 as text and I want to be able to place the 25 as an
>integer in a variable to pass to a linked list.
  v := integer'value(input(last-1 .. last));
or use ada.text_io.integer_io to read from the string.
You may want to check first that they are really digits, and the number
isn't too big to fit in an integer, etc.  Or at least expect the exception
when the input is screwed up.



  parent reply	other threads:[~2001-08-05 18:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-05 16:58 Convert ASCII numerals to Integer numbers Stewart
2001-08-05 17:34 ` Jacob Sparre Andersen
2001-08-05 17:57   ` Stewart
2001-08-05 18:13     ` martin.m.dowie
2001-08-05 18:15     ` tmoran [this message]
2001-08-06 16:09 ` Adrian Knoth
replies disabled

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