Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dramatic Increase in VFP marketshare
Message
De
27/11/1999 15:12:22
 
 
À
27/11/1999 14:20:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00295440
Message ID:
00296016
Vues:
39
>>>>VFP is a horrid choice if you need to do significant amounts of linked list manipulation.
>>>
>>>Morning Ed. From what I recall a linked list is a structure much like a database record. Can you give an example of what you mean and why a record in a table wouldn't be appropriate for this?
>>
>>A linked list is a struture that contains pointers to other structures like itsself, so that there is a sequence of travel for the structure - trees and directed graphs are two classical examples of generic classes of things that are best represented with linked lists. Imagine the headaches of traversing and redirecting the traversal of a data table where each record had fields that pointed to several other records in the same table, or might point to nothing.
>
>Ed,
>
>Perahps a 'real world' example would be a multi-level marketing organization? Where I work we used to have (thankfully! *g* though syill maintining the code) one of these. Each Agent had one parent but could have 'n' "child" Agents. Each Agent was 'linked' to their 'parent' agent and visa versa.
>
>Would this fit the definition?
>

That's one example of a single linked list - there is an embedded pointer up but not down in each record. Inmagine a chain of things where each record pointed to both it precedent and immediate successor, so that you can conveniently traverse the chain in a bidirectional fashion, and insertion becomes a matter of finding where to stick something in and adjusting the links on the fly.

Records that point to other peers, especially where they may point to more than one of their peers, are not easily and conveniently manipulated with VFP's native data structures. You can (and if you need small-scale linked list functionality in an app that fits VFP well, should) construct VFP classes that implement objects that behave well as linked list nodes, but you're very limited as far as speed and capacity. Here, C++/Delphi/LISP and lots of other things work better, and although VB is not suited as well to constructing high-level list behaviors on a class level, it is not hampered by doing things in tables, being able to define native structures that contain pointers. VFP offers significant advantages over VB in terms of constructing classes to implement linked lists, but the cost in terms of overhead is too high.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform