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.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,36baec4d89e4ceb7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-12 13:28:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!fr.usenet-edu.net!usenet-edu.net!enst.fr!not-for-mail From: Michal Nowak Newsgroups: comp.lang.ada Subject: Re: parse word from a string Date: Tue, 12 Nov 2002 22:36:56 +0100 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7BIT X-Trace: avanie.enst.fr 1037136482 4348 137.194.161.2 (12 Nov 2002 21:28:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 12 Nov 2002 21:28:02 +0000 (UTC) Return-Path: In-reply-to: X-Mailer: Calypso Version 3.30.00.00 (3) Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.13 Precedence: bulk X-Reply-To: vinnie@inetia.pl List-Unsubscribe: , List-Id: comp.lang.ada mail<->news gateway List-Post: List-Help: List-Subscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:30784 Date: 2002-11-12T22:36:56+01:00 On 2002-11-12 at 11:25 mabes180@aol.com wrote: >I'm new to Ada, can someone help me with this. >I need to read a text file word by word. THe approach I took is to >read each line of the text file and then parse the words out. I have >read each line, now I have a hard time to parse the line into words >and store them in an array. can someone help me with this. >thanks The procedure Find_Token from package Ada.Strings.xxxxx (xxxxx is Fixed, Bouded or Unbounded, depending which Strings you use) is what you are looking for. See Ada Reference Manual, section A.4.3, A.4.4, A.4.5 in particular. Hope this helps, Michal -- ----------------------------------------------------------------- -- ___ _ -- / _ \ | | I Choose Ada: -- | |_| | ___| | _____ The Most Trusted Name in Software (TM) -- | _ | | __ | | __ | -- |_| |_| |_____|_ |_____|_ http://www.adaic.org/whyada/choose.html -- -- -----------------------------------------------------------------