comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: Array help needed..
Date: Wed, 8 May 2002 04:39:24 -0500
Date: 2002-05-08T04:39:24-05:00	[thread overview]
Message-ID: <mailman.1020850802.11725.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: 6x%B8.41360$uE2.2786830@news2.calgary.shaw.ca


----- Original Message ----- 
From: "devine" <devine@linuxmail.org>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: May 07, 2002 8:52 PM
Subject: Re: Array help needed..


> I trying to do this.  Read a file, check to see if their are words in the
> file and then put the words into an array.  So I used 'a'..'z' to get a
> character so when it hits a space that would be the end of the word, it
> would move to the next character after the space.
> 
Consider these possibilities:

  1.  The words may have capital letters and apostrophes -- i.e.,
      characters that are not in 'a' .. 'z', 

  2.  The spaces between words may not just be single space characters --
      they may have multiple spaces, tabs, periods, commas, and other
      punctuation marks.

  3.  What about numbers? E.g., if you have the sentence "there were 375
      people present." -- is 375 a word?

You should loook at the procedure Ada.Strings.Fixed.Find_Token which
allows you to find tokens that include a particular group of characters,
or that exclude a particular list of characters.






      reply	other threads:[~2002-05-08  9:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-07 17:12 Array help needed devine
2002-05-07 17:21 ` chris.danx
2002-05-07 19:36 ` Preben Randhol
2002-05-08  1:52 ` devine
2002-05-08  9:39   ` David C. Hoos, Sr. [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox