comp.lang.ada
 help / color / mirror / Atom feed
* Subtypes with Combined Ranges
@ 2002-07-18 13:05 David Rasmussen
  2002-07-18 13:15 ` Lutz Donnerhacke
  2002-07-18 13:44 ` Jacob Sparre Andersen
  0 siblings, 2 replies; 4+ messages in thread
From: David Rasmussen @ 2002-07-18 13:05 UTC (permalink / raw)


An Ada-excercise reads as follows:

6.1 Write a program to count the number of occurrences of each letter of 
the alphabet typed as input at the keyboard. Using a subtype of 
Character as the index subtype of an array is a sensible way to do this.

My first thought was to do this:
subtype Alphabetical is Character range 'A'..'Z' | 'a'..'z';

But I get an error. What is the best type for this excercise?

/David




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

end of thread, other threads:[~2002-07-18 14:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-18 13:05 Subtypes with Combined Ranges David Rasmussen
2002-07-18 13:15 ` Lutz Donnerhacke
2002-07-18 13:44 ` Jacob Sparre Andersen
2002-07-18 14:48   ` David Rasmussen

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