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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,97643ec695b9bf73 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-12 10:26:41 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!elnk-pas-nf1!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Word counting References: <4d01ad29.0312120149.ddda940@posting.google.com> In-Reply-To: <4d01ad29.0312120149.ddda940@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Fri, 12 Dec 2003 18:26:40 GMT NNTP-Posting-Host: 63.184.1.170 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.pas.earthlink.net 1071253600 63.184.1.170 (Fri, 12 Dec 2003 10:26:40 PST) NNTP-Posting-Date: Fri, 12 Dec 2003 10:26:40 PST Xref: archiver1.google.com comp.lang.ada:3419 Date: 2003-12-12T18:26:40+00:00 List-Id: wave wrote: > It's not going very well, if you can tell :) > I'm missing my fopen commands and tokenize functions from PHP! Have you looked at operations such as Find_Token, Count, and Index in Ada.Strings.Fixed? Looking at your example I see the following words (non-whitespace surrounded by whitespace): a 1 word of length 1 is an it in 4 words of length 2 but see 2 words of length 3 This file work 3 words of length 4 input we'll 2 words of length 5 should 1 word of length 6 example minute. 2 words of length 7 0 words of length 8 hopefully correctly 2 words of length 9 This doesn't agree with your expected results of 1 / 4 / 2 / 3 / 1 / 2. Perhaps if you can decide what your requirements are, you'll find it easier to fulfill them. -- Jeff Carter "C++ is like giving an AK-47 to a monk, shooting him full of crack and letting him loose in a mall and expecting him to balance your checking account 'when he has the time.'" Drew Olbrich 52