Re: Does Fast Code units compile in D5 Standard ?



At 13:41:02, 28.08.2005, Leonel wrote:

> Anders Isaksson wrote:
>
> > This one has the problem that you have to turn off range-checking
> > when using it. By declaring
> >
> > PIntegerArray = ^array[0..SOME_UPPER_BOUND] of integer;
> >
> > you can leave range-checking on.
>
> IIRC, the largest possible upper bound is:
>
> PIntegerArray = ^array[0..(SizeOf(Integer) div 4) - 1] of integer;

Sizeof(Integer) div 4 - 1 = 0.

Did you mean High(Integer), or MaxInt?

PIntegerArray = ^array[0..MaxInt div SizeOf(Integer) - 1] of Integer;

--
Rudy Velthuis [TeamB] http://velthuis.homepage.t-online.de

"Don't be so humble - you are not that great."
-- Golda Meir (1898-1978) to a visiting diplomat
.



Relevant Pages