Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to erase specific dimensions of an array while a routine is
running to increase the performance of the routine? Lets say I have a 3D Array: Redim 3DArray (0 to 10000, 0 to 300, 0 to 50) Let say I populate with three For Next Loops: For X = 1 to 50 For Y = 1 to 300 For Z = 1 to 10000 3DArray(Z,T,X) = Rnd() Next Next 'Lets say I want to delete the all the data associated with X = 1 when 'the loop progresses to X = 2, and continue to do this Next |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For X = 1 to 50
For Y = 1 to 300 For Z = 1 to 10000 3DArray(Z,T,X) = Rnd() if X 1 then _ 3DArray(Z,T,X-1) = empty ' or 0 Next Next Next -- Regards, Tom Ogilvy "ExcelMonkey" wrote in message ... Is it possible to erase specific dimensions of an array while a routine is running to increase the performance of the routine? Lets say I have a 3D Array: Redim 3DArray (0 to 10000, 0 to 300, 0 to 50) Let say I populate with three For Next Loops: For X = 1 to 50 For Y = 1 to 300 For Z = 1 to 10000 3DArray(Z,T,X) = Rnd() Next Next 'Lets say I want to delete the all the data associated with X = 1 when 'the loop progresses to X = 2, and continue to do this Next |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does deleting data from the 3rd dimension free up memory to speed up the
routine? Or would I have to redimension the array to see the affects on performance? "Tom Ogilvy" wrote: For X = 1 to 50 For Y = 1 to 300 For Z = 1 to 10000 3DArray(Z,T,X) = Rnd() if X 1 then _ 3DArray(Z,T,X-1) = empty ' or 0 Next Next Next -- Regards, Tom Ogilvy "ExcelMonkey" wrote in message ... Is it possible to erase specific dimensions of an array while a routine is running to increase the performance of the routine? Lets say I have a 3D Array: Redim 3DArray (0 to 10000, 0 to 300, 0 to 50) Let say I populate with three For Next Loops: For X = 1 to 50 For Y = 1 to 300 For Z = 1 to 10000 3DArray(Z,T,X) = Rnd() Next Next 'Lets say I want to delete the all the data associated with X = 1 when 'the loop progresses to X = 2, and continue to do this Next |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sort array with 2 dimensions? | Excel Programming | |||
Array function, two dimensions?? and worksheet arrays | Excel Programming | |||
Array function, two dimensions?? | Excel Programming | |||
Checking existence of array dimensions | Excel Programming | |||
Checking Number of Dimensions In Array | Excel Programming |