Related articles |
---|
Pascal compiler and sets dallison@bfsec.bt.co.uk (1994-02-08) |
Re: Pascal compiler and sets davisdm@widget.msfc.nasa.gov (1994-02-08) |
Re: Pascal compiler and sets mauney@adm.csc.ncsu.edu (1994-02-08) |
Re: Pascal compiler and sets samiam@netcom.com (1994-02-09) |
Pascal compiler and sets ssimmons@convex.com (1994-02-09) |
Re: Pascal compiler and sets stenuit@axp05.acset.be (1994-02-10) |
Re: Pascal compiler and sets wjw@eb.ele.tue.nl (1994-02-10) |
Re: Pascal compiler and sets synaptx!thymus!daveg@uunet.UU.NET (Dave Gillespie) (1994-02-10) |
Newsgroups: | comp.compilers |
From: | davisdm@widget.msfc.nasa.gov (Mat Davis) |
Keywords: | Pascal |
Organization: | NASA/MSFC |
References: | 94-02-051 |
Date: | Tue, 8 Feb 1994 19:25:10 GMT |
Dave Allison (dallison@bfsec.bt.co.uk) wrote:
: How are sets usually implemented in Pascal? Is there a small limit placed
: on the size of sets? I can think of a number of implementation methods,
: but would like to see how it is normally done so that I dont have to do
: much more work.
In the compilers I'm familiar with (including one I wrote), sets are
usually limited to 256 elements. Sets with one machine word's worth of
elements would be more efficient, but in my opinion 'set of char' should
be supported, so 256 is the minimum.
I did consider trying to set mine up so that, say, 'set of 1900..2000' was
legal by remembering a "base" for the set. That would mean that the limit
would be 256 *consecutive* values, but it would have complicated the code
for manipulating sets more than I thought it was worth.
--
Mat Davis
davisdm@widget.msfc.nasa.gov
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.