Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multidimensional array as procedure param

Status
Not open for further replies.

DaZZleD

Programmer
Oct 21, 2003
886
0
0
US
i have two arrays
array1 : array[1..13][1..3] of string;
array2 : array[1..13][0..2] of string;


and i want to use them as params for a procedure as
myproc(array1, array2);

however i didn't manage to find the correct procedure definition for myproc. i tried:
myproc(arr1 : array of string; arr2 : array of string);
myproc(arr1 : array of array of string; arr2 : array of array of string);

but with no result. if any of you ever used something like this please advise how you solved this problem.

thanks.
 
declare both arrays as their own type, then pass the types to the procedure...

TMyarray1 =
array1 : array[1..13][1..3] of string;
TMyarray2 =
array2 : array[1..13][0..2] of string;

myproc(TMyarray1, TMyarray2);
 
Sorry, use this to declare your procedure:

procedure myproc(Ar1: TMyarray1; Ar2: TMyarray2);
 
i've thought about this sollution but was looking for a workaround without having to declare the arrays as types...

anyway thanks!
 
I don't think its possible without declaring them as types, but if you do find a way I'd like to know, so I'd appreciate it if you'd post your findings here.

l8r
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top