[PD-dev] copybytes - partial array?

Ed Kelly morph_2016 at yahoo.co.uk
Mon Sep 17 23:21:15 CEST 2007


Ah well, that's what I've done.

Cheers,
Ed

Charles Henry <czhenry at gmail.com> wrote: It will not work.  Here is our function prototype:
EXTERN void *copybytes(void *src, size_t nbytes);

The thing to see here, is that it doesn't actually copy the data to a
location you specify.  It creates a copy of the data, somewhere in
memory, and returns a pointer to the location.  If you want to have a
continuous array of numbers, you'd have to copy them one at a time
from one array to the other anyhow.

I suggest to just use getbytes() and for loops to do the assignment.

Chuck


On 9/16/07, Ed Kelly  wrote:
> Hi again to all devs,
>
> Is there any way to use copybytes to take a chunk out of an array? Say, to
> copy elements 0-10 of an array into another buffer, then concatenate
> elements 20-30 onto the end of it?
>
> B3st
> Ed++
>
>
> Lone Shark "Aviation" out now on
> http://www.pyramidtransmissions.com
> http://www.myspace.com/sharktracks
>
>  ________________________________
>  Yahoo! Answers - Get better answers from someone who knows. Try it now.
> _______________________________________________
> PD-dev mailing list
> PD-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
>
>



Lone Shark "Aviation" out now on http://www.pyramidtransmissions.com
http://www.myspace.com/sharktracks
       
---------------------------------
Try Yahoo! Mail now with Unlimited Storage and see the difference.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20070917/1036607d/attachment.htm>


More information about the Pd-dev mailing list