Re: Enumerated data types

perelgut@turing.toronto.edu (Stephen Perelgut)
Fri, 24 Aug 90 10:29:30 EDT

          From comp.compilers

Related articles
Enumerated data types mandel@forwiss.uni-passau.de (1990-08-23)
Re: Enumerated data types moss@cs.umass.edu (1990-08-24)
Re: Enumerated data types skrenta@amix.commodore.com (1990-08-15)
Re: Enumerated data types dik@cwi.nl (1990-08-24)
Re: Enumerated data types ok@goanna.cs.rmit.OZ.AU (1990-08-27)
Re: Enumerated data types jejones@microware.com (1990-08-27)
Re: Enumerated data types perelgut@turing.toronto.edu (1990-08-24)
Re: Enumerated data types dik@cwi.nl (1990-08-27)
Re: Enumerated data types grover@brahmand.Eng.Sun.COM (1990-08-28)
Re: Enumerated data types corbett@lupa.Eng.Sun.COM (1990-08-29)
Re: Enumerated data types pjj@cs.man.ac.uk (Pete Jinks) (1990-08-29)
Re: Enumerated data types kurt@tc.fluke.COM (1990-08-29)
Re: Enumerated data types anw@maths.nott.ac.uk (1990-08-29)
| List of all articles for this month |
Newsgroups: comp.compilers
From: perelgut@turing.toronto.edu (Stephen Perelgut)
Keywords: C, Pascal, design, Turing
Organization: CSRI, University of Toronto
References: <1990Aug23.134826.2865@forwiss.uni-passau.de>
Date: Fri, 24 Aug 90 10:29:30 EDT

The Turing Programming Language (developed at the University of Toronto and
the subject of previous postings here) has an approach to the problem.
type carColor : enum(red, blue, yellow, black)
type bikeColor: enum(red, orange, yellow, green, blue)


Thus succ(carColor.red) is carColor.blue and never bikeColor.orange.
Similarly, ord(carColor.red) = ord(bikeColor.red) only co-incidentally and
ord(carColor.blue) not= ord(bikColor.blue)


If you want more information on Turing, try emailing
        "distrib@turing.toronto.edu"
--


Post a followup to this message

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