Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ASCAN on a two dimensional array
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00443772
Message ID:
00443827
Views:
15
>Have an array1[9,3]. Want to search the second dimension [1,2] to [9,2] for a value. How do I limit the ASCAN to the second dimensnion only?
>Thanks
>Brenda
You only need to resort to complex measures if a data type in one of the other columns of the array is the same as the data type of the expression that you are searching for!

If each is distinct then you can use ASCAN() with impunity and let it scan the entire array. Even if the columns contain values with the same data type, you only need to be concerned if you know for certain that values in one column can also appear in one of the other columns.

To determine which column a match was found in, you can use:
iElement = ASCAN( aMyArray, xSearchForThis )
iColumn = ASUBSCRIPT( aMyArray, iElement, 2 )
censored.
Previous
Reply
Map
View

Click here to load this message in the networking platform