Re: Pascal compiler and sets

stenuit@axp05.acset.be (Pascal Stenuit)
Thu, 10 Feb 1994 18:06:41 GMT

          From comp.compilers

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)
| List of all articles for this month |
Newsgroups: comp.compilers
From: stenuit@axp05.acset.be (Pascal Stenuit)
Keywords: Pascal
Organization: A.C.S.E.T.
References: 94-02-051 94-02-059
Date: Thu, 10 Feb 1994 18:06:41 GMT

>From ssimmons@convex.com (Steve Simmons)
> The maximum size of a set is dependent upon its definition; however,
> it can be statically computed. Therefore, it is usually best to implement
> them as bit vectors because the following four set operations must
> be performed (UNION, INTERSECTION, DIFFERENCE, and IN).


If I remember correctly, there is one problem with Pascal sets: it is not
always possible to find out the base type of a set constant (as in
[1,4,7]) and this makes difficult allocating storage for it.


That's one reason one implementation may choose to put an upper-bound on
the size of sets. I believe Wirth "fixed" this problem in Modula-2 where a
set constant is always prefixed by its type (can't remember the actual
syntax).


Regards,
--
pascal stenuit. stenuit@acset.be
ACSET. Tel +32 2 655.12.33
Rue du Cerf, 200 Fax +32 2 655.12.11
B-1332 Rixensart (Genval)
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.