checking arbitrary bounds
- From: "Pawel Slusarz" <wiedzmin@xxxxxxxxx>
- Date: Fri, 27 May 2005 20:56:46 GMT
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 your comments,
Paul
.
- Follow-Ups:
- Re: checking arbitrary bounds
- From: Pawel Slusarz
- Re: checking arbitrary bounds
- From: Martin Harvey
- Re: checking arbitrary bounds
- From: Tom de Neef
- Re: checking arbitrary bounds
- From: Rob Kennedy
- Re: checking arbitrary bounds
- Prev by Date: MODI OCR "class not registered"
- Next by Date: Re: checking arbitrary bounds
- Previous by thread: MODI OCR "class not registered"
- Next by thread: Re: checking arbitrary bounds
- Index(es):
Relevant Pages
|
|