2010/9/12 Frank Church :
> Does that mean that although an enum is an ordinal type, an integer cannot
> be coerced into using it to index an array?
IMO just cast it to the correct type (of the array index) giving the
compiler a chance to accept it.
--
bflm
freepascal-bits.blogspot.com
__
On 12 September 2010 13:05, Vincent Snijders wrote:
> 2010/9/12 Frank Church :
> > I need to elaborate more on this code
> >
> > On this line
> >
> > d := stTypes[i - Ord(low(stType))];
> >
> > since stTypes is an array, I expect stTypes[n], with n being 1 to 4, to
> > retrieve an array value and
2010/9/12 Frank Church :
> I need to elaborate more on this code
>
> On this line
>
> d := stTypes[i - Ord(low(stType))];
>
> since stTypes is an array, I expect stTypes[n], with n being 1 to 4, to
> retrieve an array value and as 'i - Ord(low(stType)) evaluates to integer it
> should compile but