Copying multidimensional dynamic arrays
From: Andreas Winter (awin_at_wros.de)
Date: 01/23/04
- Previous message: Murray McCulloch: "Re: IDE Out of step after compiling..."
- Next in thread: Maarten Wiltink: "Re: Copying multidimensional dynamic arrays"
- Reply: Maarten Wiltink: "Re: Copying multidimensional dynamic arrays"
- Reply: Bruce Roberts: "Re: Copying multidimensional dynamic arrays"
- Reply: Jamie: "Re: Copying multidimensional dynamic arrays"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 23 Jan 2004 20:54:18 +0100
Hi,
I've got an 3-Dimensional dynamic Array with the following
structure:
Matrix : array of array of array of String; // Level,Y,X values
Of course it would be initialised with SetLength. In my program
I need to copy from one level to another the Y,X-Sub Array very
often. I've build an nested for-loop wich works well but not as fast
as I think.
procedure TfrmMatrixr.CopyMatrix(fromM, toM : Integer);
var
x,y:Integer;
begin
for x:=1 to highx do
for y:=1 to highy do
matrix[toM,y,x]:=matrix[fromM,y,x];
end;
I would prefer to use
Matrix[2]:=Copy[Matrix[0])
wich won't work to speed up things. Or are there any other ideas
I could use to improve the speed up this copy process??
sincerely
Andreas
- Previous message: Murray McCulloch: "Re: IDE Out of step after compiling..."
- Next in thread: Maarten Wiltink: "Re: Copying multidimensional dynamic arrays"
- Reply: Maarten Wiltink: "Re: Copying multidimensional dynamic arrays"
- Reply: Bruce Roberts: "Re: Copying multidimensional dynamic arrays"
- Reply: Jamie: "Re: Copying multidimensional dynamic arrays"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|