On Wed, 6 Sep 2006 15:19:02 -0700, dreeschkind
<dreeschkind@discussions.microsoft.com> wrote:
>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:
>
>http://www.schoenleber.org/pascal/pascal1-08.html
>
>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
enumerated type.
From
http://www.macdonald.egate.net/CompS...cal/henum.html
The type is declared as an ordinal list in the type section such as
the following one for the days of the week.
type
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
following.
for day := SUN to SAT do