Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!unido!infbs!neitzel From: neitzel@infbs.UUCP (Martin Neitzel) Newsgroups: comp.lang.modula2 Subject: Re: Size of sets (was: Re: type conversion question) Message-ID: <1296@infbs.UUCP> Date: 26 Jun 89 15:26:03 GMT References: <14226@watdragon.waterloo.edu< <7465@xenna.Encore.COM> <6187@pdn.paradyne.com> <985@maestro.htsa.aha.nl> <6197@pdn.paradyne.com> <912@gould.doc.ic.ac.uk> Organization: TU Braunschweig,Informatik,West Germany Lines: 24 One of the original questions was "Is SET OF CHAR a legal type?". Some submissions discussed the contraints suggested or required for the size N of "base type" T in "SET OF T". I just want to point out that "SET OF CHAR" must be illegal because of the other constraints put on T. To narrow the report (already cited by Frans van Otten) even more down: pim3> This must be a subrange type of the integers [...], pim3> or a (subrange of an) enumeration type ... CHAR simply doesn't qualify. There are several places in PIM3 where subranges and enumerations are allowed and it was necessary to add CHAR and BOOLEAN explicitly, for example consider index types of arrays. Chapter 16 in the tutorial section introduces BOOLEAN as a enumeration type. This is conceptually clear and consistent within in the entire language. However, this classification didn't make it into the reference part. Don't ask me why. Likewise, Modula-2 could benefit from viewing CHAR as an enumeration type in my opinion. Martin