Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preserve original column when redim array
Message
From
16/06/2000 11:55:56
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Preserve original column when redim array
Miscellaneous
Thread ID:
00381449
Message ID:
00381449
Views:
45
Hey all,
is there a way to preserve the original columnar state of a one dimensional array when you redimension the array to two dimensional?

For example:

dime myarray(3)

myarray(1) = '1'
myarray(2) = '2'
myarray(3) = '3'

dime myarray(3,2)

Array now consists of this:
myarray(1,1) = '1'
myarray(1,2) = '2'
myarray(2,1) = '3'
myarray(2,2) = .F.
myarray(3,1) = .F.
myarray(3,2) = .F.

is there a command that will give me this instead:
myarray(1,1) = '1'
myarray(1,2) = .F.
myarray(2,1) = '2'
myarray(2,2) = .F.
myarray(3,1) = '3'
myarray(3,2) = .F.

keeping the values in the original column? or do I need to write a UDF to do this?

Thanks

Jon
Reply
Map
View

Click here to load this message in the networking platform