Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
An Array v's A Dictionary
#10
(10-08-2024, 02:46 PM)Dimster Wrote: Oh Ds...another thought just crossed my mind (dangerous I know)

To ReDim a 2 dimensional array ionly works on the 1st index, so ReDim MyArray(1 to x, 1 to 350) is doable whereas ReDim MyArray (1 to 350, 1 to x) doesn't work. Does the use of Dictionary solve this reDimming of multiple dimensional arrays?

A 2D array is not needed. You could use 2 - 1D arrays, one for Keys and one for Values and associate them by using the same index number. But this seems perfect place to use
Type Dictionary
as String Key, Value
End Type

if like what's going on then use advanced linked lists or hash table for speed.

Update: BTW KP correct about needing to use Dynamic arrays. Starting them with ReDim instead of Dim is best.
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
An Array v's A Dictionary - by Dimster - 10-07-2024, 07:18 PM
RE: An Array v's A Dictionary - by bplus - 10-07-2024, 08:03 PM
RE: An Array v's A Dictionary - by TerryRitchie - 10-07-2024, 08:23 PM
RE: An Array v's A Dictionary - by DSMan195276 - 10-08-2024, 02:27 AM
RE: An Array v's A Dictionary - by Dimster - 10-08-2024, 10:26 AM
RE: An Array v's A Dictionary - by DSMan195276 - 10-08-2024, 12:52 PM
RE: An Array v's A Dictionary - by Dimster - 10-08-2024, 02:22 PM
RE: An Array v's A Dictionary - by Dimster - 10-08-2024, 02:46 PM
RE: An Array v's A Dictionary - by Kernelpanic - 10-08-2024, 04:31 PM
RE: An Array v's A Dictionary - by bplus - 10-08-2024, 05:10 PM
RE: An Array v's A Dictionary - by TempodiBasic - 10-08-2024, 06:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Array out of passing arrays... Pete 2 417 09-22-2025, 08:53 PM
Last Post: ahenry3068
  Huge array of variable length strings mdijkens 9 1,879 10-17-2024, 02:01 PM
Last Post: mdijkens
  suggestion: initialize array values within the DIM statement bobalooie 19 3,426 12-22-2022, 06:46 PM
Last Post: Kernelpanic

Forum Jump:


Users browsing this thread: 1 Guest(s)