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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f3ad228831281c35 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-07 20:36:58 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!t-online.de!fr.usenet-edu.net!usenet-edu.net!enst.fr!not-for-mail From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada Subject: Re: getting words from file Date: Fri, 7 Mar 2003 22:36:27 -0600 Organization: ENST, France Message-ID: References: Reply-To: "comp.lang.ada mail to news gateway" 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 1047098217 47903 137.194.161.2 (8 Mar 2003 04:36:57 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Sat, 8 Mar 2003 04:36:57 +0000 (UTC) To: "comp.lang.ada mail to news gateway" Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.1 Precedence: list List-Id: comp.lang.ada mail to news gateway List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:35060 Date: 2003-03-07T22:36:27-06:00 Look at the procedure Ada.Strings.Fixed.Find_Token. Tokens are groups of characters delimited by certain other characters. For example if you specify whitespace characters (e.g., space, tab, etc.) plus punctuation marks as delimiters, then the found tokens will be words, if the file is ordinary text. Find_Token will tell you the index of the first and last characters of the next token after some starting index. Thus, after you find a token you start looking at the next character following the last character of the token just found, you'll find the next token, and so on. ----- Original Message ----- From: "cookie" Newsgroups: comp.lang.ada To: Sent: March 07, 2003 9:58 PM Subject: getting words from file > Does anyone know how I would store a word in a specific variable after > a space occurs inside a textfile? (say there was a line in the > textfile like this: one two three four five... I'd want it to get > these words and store it in an already defined var like varOne varTwo > and so on. > > This is the idea I was playing with to get the actual word (scans > through the characters until it hits a space and tries to merge all of > those characters into a word): http://www.guff.org/ada.txt ..or am I > way off? > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada > >