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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bd4e40454c63169a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-02 15:58:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!colt.net!dispose.news.demon.net!demon!btnet-peer0!btnet-feed5!btnet!news.btopenworld.com!not-for-mail From: "Jim" Newsgroups: comp.lang.ada Subject: Re: How to convert characters in a string into integers ? Date: Sat, 2 Feb 2002 23:57:36 +0000 (UTC) Organization: BT Openworld Message-ID: References: NNTP-Posting-Host: 213.122.239.103 X-Trace: paris.btinternet.com 1012694256 15064 213.122.239.103 (2 Feb 2002 23:57:36 GMT) X-Complaints-To: news-complaints@lists.btinternet.com NNTP-Posting-Date: Sat, 2 Feb 2002 23:57:36 +0000 (UTC) X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MSMail-Priority: Normal X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:19543 Date: 2002-02-02T23:57:36+00:00 List-Id: sorry to sound dumb, whats LRM ? "Michal Nowak" 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 _|__ >