|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Assigning the contents of one array to another.
Hi Guys,
I came accross a problem today, I want to assign all of the values from one array into another array that is the same in size and type... Code:
Dim ArrayX(0 To 2) As Integer Dim ArrayY(0 To 2) As Integer ArrayX = ArrayY VB6 wont seem to let me do this. I know that I could easily construct a For loop that could do this for me, but I was jsut wondering if there was a more efficient built-in way of doing it? It seems odd that C++ can do this, but VB6 cant (I think that C++ can do it anyway!) ![]()
__________________
LozWare Website Directory Whooo! Free submissions, no recip needed. I'm a nice guy
|
|
#2
|
||||
|
||||
|
in C++ you can only copy the reference to the array,
any change to ArrayX will affect ArrayY as well - not exactly what you want. ![]() VB.NET has Array.Copy function, but it's not likely it's part of ordinary VB as well. |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Assigning the contents of one array to another. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|