LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

C2LV Arrays

In Labview 6i professional, i have an array which contains arrays. I
need to get only some of the array members at a time, but i dont want
to copy them in any way. What i want is to write a c-language dll or a
CVI subroutine which will have the following form:

int *** ChangePointers(int **AOP, int *indexes, int size)
{
int **result; // result array

result = new int[size]; // init 1-D array of arrays

for(int i=0;i {
result[i] = AOP[indexes[i]]; // Copy pointers(!) from AOP indexes
}

return &result; // Return result array
}

NOTE: neglect pointer mistakes, i just did a prototype.

Run over the and copy the member of the *indexes* array
needed indexs with values with the matching *AOP* arra
ys *size* times.
i.e:

AOP = { *arr1, *arr2, *arr3, *arr4 }
indexes = { 1, 3 }
size = 2

the result will be { *arr1, *arr3 }

PLEASE SEND A PSEUDO/FULL/ALTERNATIVE CODE ASAP!
Examples explaining how to use array from/to labview will be welcomed
as well.
0 Kudos
Message 1 of 1
(2,493 Views)