New topic: Getting an array of integers from a memory block or stream.
<http://forums.realsoftware.com/viewtopic.php?t=47585> Page 1 of 1 [ 4 posts ] Previous topic | Next topic Author Message BrianOBrien Post subject: Getting an array of integers from a memory block or stream.Posted: Sat Apr 13, 2013 12:16 pm Joined: Wed Jul 07, 2010 2:55 pm Posts: 672 Location: University Of Calgary, Faculty Of Medicine I have a memory block that I want to copy into an int array. Must it be done one element at a time or is there a way to do it in one operation? _________________ If at first you don't succeed... Try REALBasic. Top ktekinay Post subject: Re: Getting an array of integers from a memory block or strePosted: Sat Apr 13, 2013 12:20 pm Joined: Mon Feb 05, 2007 5:21 pm Posts: 554 Location: New York, NY Is the array always of the same fixed size? If so, you can use a Structure. _________________ Kem Tekinay MacTechnologies Consulting http://www.mactechnologies.com/ Need to develop, test, and refine regular expressions? Try RegExRX. Top BrianOBrien Post subject: Re: Getting an array of integers from a memory block or strePosted: Sat Apr 13, 2013 12:24 pm Joined: Wed Jul 07, 2010 2:55 pm Posts: 672 Location: University Of Calgary, Faculty Of Medicine no. it's variable in size. _________________ If at first you don't succeed... Try REALBasic. Top ktekinay Post subject: Re: Getting an array of integers from a memory block or strePosted: Sat Apr 13, 2013 12:28 pm Joined: Mon Feb 05, 2007 5:21 pm Posts: 554 Location: New York, NY Then you'll have to loop through it. Fortunately, this is pretty fast, especially if you use a Ptr to access the MemoryBlock. _________________ Kem Tekinay MacTechnologies Consulting http://www.mactechnologies.com/ Need to develop, test, and refine regular expressions? Try RegExRX. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 4 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
