Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!mintaka!spdcc!esegue!compilers-sender From: pjj@cs.man.ac.uk (Pete Jinks) Newsgroups: comp.compilers Subject: Re: Enumerated data types Keywords: Pascal, design Message-ID: <1644@m1.cs.man.ac.uk> Date: 29 Aug 90 13:47:19 GMT Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: Pete Jinks Organization: Compilers Central Lines: 18 Approved: compilers@esegue.segue.boston.ma.us mandel@forwiss.uni-passau.de (Luis Mandel) writes: >anyone knows if there are languages that allows anything like > car_colours = (red, blue, brown, black); > bike_colours = (orange, red, green, white); I realise that this is an answer to a different question, but in Pascal, in this limited case, one could write: all_colours = (blue, brown, black, red, orange, green, white); car_colours = blue .. red; bike_colours = red .. white; Of course, I have had to re-order the colours so that succ & pred now work differently, but if you are just using them to cycle through all possibilities it is still OK. -- Send compilers articles to compilers@esegue.segue.boston.ma.us {ima | spdcc | world}!esegue. Meta-mail to compilers-request@esegue.