[fpc-devel] "case" with range stupidities

Daniël Mantione daniel.mantione at freepascal.org
Thu Feb 15 14:36:25 CET 2007



Op Thu, 15 Feb 2007, schreef Vinzent Hoefler:

> Well, fair enough, but why is that I can declare a
> =

>    type
>       Foo =3D array[byte] of Something;
> =

> where the type name "byte" also indicates the range? Considering that
> =

>    type
>       Foo =3D array[Low (byte) .. High (byte) of Something;
> =

> is totally equivalent, the allowed usage of range types seems a little =

> bit inconsistent...

Yes, but as I said, case labels are a set, not just a range:

const x=3D[0,1,5];

type foo=3Darray[x] of something

...would again be rather weird.

Dani=EBl


More information about the fpc-devel mailing list