supriyav Posted September 24, 2005 Report Share Posted September 24, 2005 I've an input array A[255] such that A[0] to A[3] is considered as a block Therfore totally 64 blocks (from Block 0 to Block 63) I'll get a command with Start block and number of blocks to read. Start Block= 0 to 63 Numblocks=1 to n n depends on the Start block i.e if Start Block=0 then the NumBlocks=1 to 64 if Start block=1 then NumBlocks=1 to 63 ... i need to frame an output array for all the combination. to make it simple i want to use loop.But i cudn't make it up. Pls do the needful Thanks and Regards Supriya Quote Link to comment
Mark Balla Posted September 24, 2005 Report Share Posted September 24, 2005 I can probably help but I need more information I've an input array A[255] such that A[0] to A[3] is considered as a block Therfore totally 64 blocks (from Block 0 to Block 63) How does this equate to 255 is it a 4x64 2D array or a 1x255 1D array I'm confused as to what exactly a block is. Is it an element in the array or a group of elements. I'll get a command with Start block and number of blocks to read.Start Block= 0 to 63 Numblocks=1 to n n depends on the Start block i.e if Start Block=0 then the NumBlocks=1 to 64 if Start block=1 then NumBlocks=1 to 63 ... so 2=1 to 62 and 63=1 n(NumBlocks)=1 to 64-(Start block)? i need to frame an output array for all the combination. what do you mean by frame? 1D array 2D array to make it simple i want to use loop.But i cudn't make it up.Pls do the needful Thanks and Regards Supriya It would help if you could post the code you are working on. If I can see what you are using for input and outputs it is much easier. Also remember to save it as a development distribution llb before posting. Quote Link to comment
Michael Aivaliotis Posted September 25, 2005 Report Share Posted September 25, 2005 Your definition of a block as related to the array information does not jive. In any case, regardless, what you probably want is to use the array subset function. You can feed in the start index and length of the the elements you want. This should handle what you want. Quote Link to comment
supriyav Posted September 27, 2005 Author Report Share Posted September 27, 2005 Your definition of a block as related to the array information does not jive. In any case, regardless, what you probably want is to use the array subset function. You can feed in the start index and length of the the elements you want. This should handle what you want. Array[255] is a single dim array. each four element is a Block. A[0] to A[3] --- Block0 A[4] to A[7] --- Block1 ... Thanks for ur Reply... I did it Using the Array Subset functionality... I need one more help... Can You pls tell me How to calculate Checksum for an array using Compound Artithmetic (Xor) Without Splitting the array Actually My output array varies i.e it may be 5,10,15,20,...255 depending upon the Command (Start block and NumBlock) Splitting this big array occupies space... Can you Suggest me some easy way Pls Do the needful Thanks and regards SupriyaV Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.