Related articles |
---|
[4 earlier articles] |
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) |
Newsgroups: | comp.compilers |
From: | Pete Jinks <pjj@cs.man.ac.uk> |
Keywords: | Pascal, design |
Organization: | Compilers Central |
Date: | 29 Aug 90 13:47:19 GMT |
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.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.