Re: Copy portions of array
- From: "wxforecaster" <wxforecaster@xxxxxxxxx>
- Date: Thu, 21 Dec 2006 12:34:00 -0600
The main byte array is a file being read in, which is discarded afterwards.
The feed to the smaller byte arrays is for processing the byte data in this
binary file. Yes, I need to copy it.
Evan
"Larry Serflaten" <serflaten@xxxxxxxxxxxxxx> wrote in message
news:%23fDwugSJHHA.3936@xxxxxxxxxxxxxxxxxxxxxxx
"wxforecaster" <wxforecaster@xxxxxxxxx> wrote
Say I have an array with 5000 elements in it
arr(4999)
I want to copy a portion of that array (say elements 100 to 400) to a new
array:
arr2(300)
Is there a more efficient and quicker way to perform this action vs. a
for
loop???
For i = 100 to 400
arr2(i-100) = arr(i)
Next i
I'm dealing with some very large data sizes here (this was just an
arbitrary
example).
You already have the data in memory, why would you want to copy it?
About the only reason I can think of, that would require a copy, is that
you want to fork the data, and make changes to part of it, while keeping
the original intact.
If that is not your reason, do you really need to copy it? Could you
not just index it in different lists?
LFS
.
- Follow-Ups:
- Re: Copy portions of array
- From: J French
- Re: Copy portions of array
- References:
- Copy portions of array
- From: wxforecaster
- Re: Copy portions of array
- From: Larry Serflaten
- Copy portions of array
- Prev by Date: Re: Copy portions of array
- Next by Date: Re: Copy portions of array
- Previous by thread: Re: Copy portions of array
- Next by thread: Re: Copy portions of array
- Index(es):
Relevant Pages
|