Hi,

PROCEDURE ProcessArray(A: ARRAY OF EXTENDED);
VAR I: INTEGER;
BEGIN
  FOR I := Low(A) to High(A) DO A[I] := <whatever you want>;
END;

However, you should read the online help regarding how Delphi handles open 
arrays (search for "open array").

Good luck,
Gunnar

----- Original Message ----- 
From: "Stan" <[EMAIL PROTECTED]>
To: <delphi@elists.org>
Sent: Saturday, December 23, 2006 5:58 PM
Subject: Passing an array


> Hi,
> 
>   I am writing a routine to manipulate an array of type extended.
> Various other routines will call this routine, and the size of the
> array to be passed will vary.
>   How can I pass an array to this routine?  Something like, pass the
> size of the array and the location of the first value, so the
> routine's calling sequence would be something like (var N : integer;
> var Arr : ???).
>   I want to be able to call it with, for example, an array defined in
> the calling program as "var Arr1 : array[1..100] of extended" and also
> later with an array defined as "var Arr2: array[1..750] of extended".
> How do I define the routine so that it can accept and work with an
> array of any size?
> 
> Thanks,
> -- Stan
> _______________________________________________
> Delphi mailing list -> Delphi@elists.org
> http://www.elists.org/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://www.elists.org/mailman/listinfo/delphi

Reply via email to