comp.lang.ada
 help / color / mirror / Atom feed
From: "Jim" <genx54321@hotmail.com>
Subject: Re: How to convert characters in a string into integers ?
Date: Sat, 2 Feb 2002 23:57:36 +0000 (UTC)
Date: 2002-02-02T23:57:36+00:00	[thread overview]
Message-ID: <a3hudf$emo$1@paris.btinternet.com> (raw)
In-Reply-To: mailman.1012692482.11946.comp.lang.ada@ada.eu.org

sorry to sound dumb, whats LRM ?


"Michal Nowak" <vinnie@inetia.pl> wrote in message
news:mailman.1012692482.11946.comp.lang.ada@ada.eu.org...
> On 02-02-02 at 21:59 Jim wrote:
>
> Have a look a Find_Token procedure (LRM A.4.3 - A.4.5).
>
> Little example:
>
> Find_Token (Source => "(102 + 200 + 32)",
>             Set=>To_Set("0123456789"),
>             Test=>Inside,
>             First,
>             Last,);
>
> This will give you the beginning and ending of first integer
> in source string. You may than slice it and convert this slice
> to integer:
> Operand := Integer'Value (Input_String (First .. Last) );
> For this case you will have 102 in Operand.
>
> Hope this was a bit helpful,
> Mike
>
> PS. To make this code compile you will have to "with" some
> packeges - look at mentioned LRM sections to which ones.
> -----------------------------------------
>                              ____|
>                              \%/ |~~\
>   O                                  |
>  o>>        Mike Nowak               |
>  T                                   |
> / >       vinnie@inetia.pl           |
> http://www.geocities.com/vinnie14pl _|__
>





  reply	other threads:[~2002-02-02 23:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-02 21:59 How to convert characters in a string into integers ? Jim
2002-02-02 22:09 ` Florian Weimer
2002-02-02 23:27 ` Michal Nowak
2002-02-02 23:57   ` Jim [this message]
2002-02-03  3:25     ` Jim Rogers
2002-02-03  8:56     ` Michal Nowak
2002-02-04 16:12       ` Marin David Condic
2002-02-05  1:40         ` ARM (was: Re: How to convert characters in a string into integers ?) Jeffrey Carter
2002-02-05 14:57           ` Marin David Condic
2002-02-06 15:19             ` Ted Dennison
2002-02-06 15:52             ` Stephen Leake
2002-02-06 16:13             ` Jeffrey Carter
2002-02-10 16:47           ` Florian Weimer
2002-02-10 17:24             ` ARM (was: Re: How to convert characters in a string intointegers ?) Uckfay Ouyay
2002-02-05 14:36         ` How to convert characters in a string into integers ? Michal Nowak
2002-02-05 15:17           ` Jerry Petrey
2002-02-05 16:06             ` Marin David Condic
2002-02-14 19:52               ` ARM vs. LRM vs. ... (was: Re: How to convert characters in a string into integers ?) Tucker Taft
2002-02-14 20:12                 ` Jerry Petrey
2002-02-15  9:56                   ` Steffen Huber
2002-02-12 12:03 ` How to convert characters in a string into integers ? John English
  -- strict thread matches above, loose matches on Subject: below --
2002-02-06  6:55 Christoph Grein
2002-02-06  9:20 ` Jean-Etienne Doucet
2002-02-06 10:01 Christoph Grein
replies disabled

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