AncientyHacker
Programmer
So I'm playing with this newfangled generic feature.
Kinda cool, you can paremeterize the type of the array elements:
MultiArray<Ty> = record
Items: array[ 1..100 ] of Ty;
end;
Next thing, I'd like to paremeterize the index type:
MultiArray<Ty,Inx> = record
Items: array[ Inx ] of Ty;
end;
... but no joy, the compiler complains about that. It wants an already defined ordinal type. Sigh.
Why would there be such a severe restriction like that?
Kinda cool, you can paremeterize the type of the array elements:
MultiArray<Ty> = record
Items: array[ 1..100 ] of Ty;
end;
Next thing, I'd like to paremeterize the index type:
MultiArray<Ty,Inx> = record
Items: array[ Inx ] of Ty;
end;
... but no joy, the compiler complains about that. It wants an already defined ordinal type. Sigh.
Why would there be such a severe restriction like that?