From: Jeffrey Carter <spam@spam.com>
Subject: Re: Word counting
Date: Fri, 12 Dec 2003 18:26:40 GMT
Date: 2003-12-12T18:26:40+00:00 [thread overview]
Message-ID: <ALnCb.746$Pg1.640@newsread1.news.pas.earthlink.net> (raw)
In-Reply-To: <4d01ad29.0312120149.ddda940@posting.google.com>
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
next prev parent reply other threads:[~2003-12-12 18:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-12 2:39 Word counting ada_wizard
2003-12-12 9:49 ` wave
2003-12-12 18:26 ` Jeffrey Carter [this message]
2003-12-13 3:40 ` Steve
2003-12-13 6:09 ` tmoran
-- strict thread matches above, loose matches on Subject: below --
2003-12-12 12:56 amado.alves
2003-12-11 22:53 amado.alves
2003-12-11 22:47 amado.alves
2003-12-11 22:01 wave
2003-12-11 22:45 ` David C. Hoos
2003-12-12 1:17 ` Jeffrey Carter
2003-12-12 3:22 ` Steve
2003-12-12 14:33 ` Martin Krischik
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox