Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tutorial, Course, or Book on ARRAY Handling?
Message
De
09/04/2015 15:01:55
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
09/04/2015 14:47:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Documentation de produit
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Web
Divers
Thread ID:
01618082
Message ID:
01618094
Vues:
56
>>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.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform