Array sizes are only needed when the declaration is being used to actually allocate memory.
For references to arrays, simply omit the size/range part. function ChangeArray(var N: integer, var a: array of extended): boolean; The function is responsible for respecting the bounds of the array. Use the LOW and HIGH functions to determine the array low/high bounds. Jason ----- Original Message ----- From: "Stan" <[EMAIL PROTECTED]> To: <delphi@elists.org> Sent: Saturday, December 23, 2006 10:58 AM 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