On Wed, 6 Sep 2006 15:19:02 -0700, dreeschkind
>Actually, this was one of the features that I initially expected to be
>supported too, when I first learned about PowerShell's range operator.
>The syntax 'a'..'z' very much reminds me of good old Turbo Pascal days.
>In case you're not familiar with Pascal (anymore), just have a look at the
>examples on this website:
>I agree that this syntax may be very usefull, so if it doesn't break
>something else, I would very much love to see something like this in
>PowerShell as well!
I'd vote for this too.
I was going to say (you beat me to it!) that this reminded me
instantly of Pascal and the early days of my CS degree back before the
meteoric rise of C and its decendents. Heady times I'm sure. DCL was
around about then too - back in the early 80s
I remember a project to write a Pascal compiler (in C!) - I added
error checking terminal symbols in a C enum and still recall my
feeling that the C enum was nowhere near as useful as the Pascal
The type is declared as an ordinal list in the type section such as
the following one for the days of the week.
days = ( SUN, MON, TUES, WED, THURS, FRI, SAT );
day : days;
could be assigned a value as follows
day := TUES
The use of the enumerated type permits loops to be defined such as the
for day := SUN to SAT do