Re: checking arbitrary bounds
- From: "Pawel Slusarz" <wiedzmin@xxxxxxxxx>
- Date: Tue, 31 May 2005 17:41:10 GMT
"Pawel Slusarz" <wiedzmin@xxxxxxxxx> wrote in message
news:iQLle.11169$PS3.2823@xxxxxxxxxxxx
> Surely someone must've run into this before. I want to write a
> function that combines the functionality of Low() and High().
>
> // non-working example
> function IsIndexWithinBounds(i : integer; var a) : boolean;
> begin
> Result := (i >= low(a)) and (i <= high(a));
> end;
>
> I'd settle for arbitrary arrays, if the above can't be done.
Thanks for the responses. Thinking more about the problem, it
seems to me that the right direction for me would be to move
away from the arrays (and string lists) into a Collections
library.
Paul
.
- References:
- checking arbitrary bounds
- From: Pawel Slusarz
- checking arbitrary bounds
- Prev by Date: Re: Nice odd tcpip socket question.
- Next by Date: Enter data in a dbgrid
- Previous by thread: Re: checking arbitrary bounds
- Next by thread: Delphi 2005 executes slower?
- Index(es):