We help IT Professionals succeed at work.

# Keep array values when ReDimed

on
666 Views
Lets say I have an array A(624, 9). it is already populated with values. How can i ReDim it to A(78, 78) and keep the original values (exactly the first 6241 values in A(624, 9), in the same order they appear when running from top to bottom, reading line by line in left to right order. This way, they are to form a square ReDimed array - A(78, 78) exactly filled with 6241 values taken orderly from the original A).
E. G.
original A = a b c d
e f g h
i  j k  l
m n o p
q  r s  t
u  v w x

ReDimed A = a b c d e f
g h i  j  k l
m n o p q r
s  t  u v w x

many thanks.
Comment
Watch Question
Commented:
This problem has been solved!
###### Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

Deciding to stick with EE.

Mohamed Asif

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant