Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!helios.ee.lbl.gov!ucsd!ucsdhub!hp-sdd!hplabsy!hp-ses!hpcuhb!hpcllla!hpclisp!hpcljms!brians From: brians@hpcljms.HP.COM (Brian Sullivan) Newsgroups: comp.lang.pascal Subject: Re: Pascal sets Message-ID: <950032@hpcljms.HP.COM> Date: 22 Jan 90 19:49:00 GMT References: <11866@goofy.megatest.UUCP> Organization: Hewlett-Packard Calif. Language Lab Lines: 28 Most of the Pascal compiliers that I know which implement the above set constructs use one of these two methods. Method 1. Used by UCSD Pascal is to require that sets by limited to 256 elements or less. They choose 256 because it allow them to use set of char in the compiler. I belive that it would reject the use of a set constant that contained an element outside the range 0..255. In this implementation all integer based sets are represent by a bit array of 256 bits. Method 2. This method rejects any overloaded set constant. Instead each set constant must be qualified by the type it is a member of. For example your statement: > if([i..j] <> [j] ) then > writeln('How big are constructed sets?'); would have to be written > if(t35([i..j]) <> t35([j]) ) then > writeln('How big are constructed sets?'); For references on this method see Oregon Pascal, Microsoft Pascal and Meridian Pascal. -- Brian --