comp.lang.ada
 help / color / mirror / Atom feed
* String slicing.
@ 2002-03-17 22:23 Wannabe h4x0r
  2002-03-17 22:43 ` Jim Rogers
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wannabe h4x0r @ 2002-03-17 22:23 UTC (permalink / raw)


I've written a type definition as follows...

	type wrd_string is new String(1..Ada.Characters.Latin_1.Space);

Now it says that I'm using incompatible types. Now, shouldn't the
compiler be smart enough to recognize that I'm using Characters to count
the characters of an array slice. i.e. a String is nothing more than an
array of characters.

Basically I'm breaking down a text file into chunks of "words" and
"sentences" for sorting by Mats Webers "quick_sort" routine in his
components library. Or rather, I'm learning how to. I can sort by
character easily enough, now I'm learning to work with slices of Strings.

This is a general pain in the ass for me, as it seems Ada wont let me
slice and reference pieces of strings using Characters. Dont worry, I am
reading the manual. Any tips or pointers would be helpful.

Chris



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-03-19  2:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-17 22:23 String slicing Wannabe h4x0r
2002-03-17 22:43 ` Jim Rogers
2002-03-17 23:53   ` Wannabe h4x0r
2002-03-18 12:44 ` sk
2002-03-19  2:36   ` Wannabe h4x0r
2002-03-18 17:49 ` Georg Bauhaus

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