>>Does anyone know of a book, course, or tutorial that will teach me how to handle deeper concepts of array handling, something beyond the regular 2-dimensional arrays? My client has one set of arrays that are nested to 10 levels deep. I know that someone on here will say, "Oh, that's a piece of cake (or easy)! An array is just an array."
>
>Can you give us an idea of what it's used for, and what you need to do? Is it used in support of something like a treeview? Or is there advanced math being used e.g. matrix operations?
>
>I don't know how much of this you already know but it may be useful for others:
>
>If you're working in VFP you have DIMENSION to create arrays, then you have to know the syntax for addressing array elements. VFP arrays are one-based (as opposed to many other languages where they are zero-based).
>
>There are various primitive functions available e.g.
>
>ACOPY()
>ADEL()
>AELEMENT()
>AINS()
>ASORT()
>ASUBSCRIPT()
>
>VFP supports only 1- or 2-dimensional arrays. By "nesting" I suspect you've got a situation where the elements of a given array are themselves arrays, and so forth down as deep as 10 levels.
>
>If there's existing code, hopefully it includes some more advanced user-defined functions that let you do things like traverse the links/nesting levels. Code like that is often recursive (or it should be) which tends to be tricky and requires great care in maintaining or enhancing.
>
>As a side note, if you're working with something like a treeview, rather than using nested arrays you can use a single data table (i.e. DBF) and implement a linked list. Processing usually requires writing your own (usually recursive) UDFs. However, depending on what you want to do there may be the option to use dBASE-style ISAM processing (SCAN, GOTO, SKIP etc.) or even the SQL engine. If you're familiar with Fox you may find this approach more intuitive than using arrays.
I use collections for n-dimensional stuff.
Lutz
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]