
SUBRANGES
Just as you can create your own set of pre-defined data types,
you can also create a smaller subset or subrange of an existing
set which has been previously defined. Each subrange consists of
a defined lower and upper limit. Consider the following,
type DAY = (Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday);
Weekday = Monday..Friday; {subrange of DAY}
Weekend = Saturday..Sunday; {subrange of DAY}
Hours = 0..24; {subrange of integers}
Capitals= 'A'..'Z'; {subrange of characters)
NOTE: You cannot have subranges of type real.
Which of the following are legaltype Gradepoints = 0.0..4.0; Numbers = integer; Alphabet = 'Z'..'A';Click here for answer
