comp.lang.ada
 help / color / mirror / Atom feed
From: mfb@mbunix.mitre.org (Michael F Brenner)
Subject: Re: String Manipulation - Help Needed
Date: 1998/04/06
Date: 1998-04-06T00:00:00+00:00	[thread overview]
Message-ID: <6gat22$dh5@top.mitre.org> (raw)
In-Reply-To: x3g0MCAC5AK1EwY0@roslyn.demon.co.uk


From: Howard Davies <Howard@roslyn.demon.co.uk>                          \-[1]

Howard Davies reports an Ada error > ... remove all spaces from a string ...
                                   > My 600 page Ada book just says that 
                                   > this requies advanced packages that
                                   > are beyond the scope of the book.       

It could be that you have misread the book, or it could be that the
book actually says this. If the book actually says this, could you
please post the exact sentence, page number, book name, author, and
publisher, so I can request it to be fixed.

Howard > I have a sentence stored in a string and 
       > I need 
       > to remove all spaces and punctuation from the string. 

An Ada string is an array of characters. Once it is allocated with
a given length, it behaves a lot like arrays of characters in
other languages, except that is has a FIRST and LAST column
number which are of type POSITIVE.

So, you can remove the spaces and punctuation with a loop just like
you would in C, Pascal, Java, FORTRAN, awk, perl, SETL, ALGOL,
EPSILON for the BESM-6, BASIC, etc. 

If your real question is that you do not know how to program this loop,
please repost here and say so, and I will show you to to program it.

Mike Brenner





  parent reply	other threads:[~1998-04-06  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-06  0:00 String Manipulation - Help Needed Howard Davies
1998-04-05  0:00 ` Corey Ashford
1998-04-05  0:00 ` Matthew Heaney
1998-04-06  0:00 ` Michael F Brenner [this message]
1998-04-07  0:00 ` Robert Dewar
1998-04-07  0:00   ` Howard Davies
1998-04-07  0:00     ` Michael F Brenner
1998-04-07  0:00     ` Robert Dewar
replies disabled

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