Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New VB Features
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00425458
Message ID:
00426957
Vues:
28
>Well, that maybe your definition of a structure in C and the "old days". However in Java, VB and VFP a structure is not defined by contiguous memory. It is simply an abstract definition of an object to make it simpler for the programmer to manage the object.
>

Actually, in both Java and VB, structures reflecting the equivalent of typedef memory objects defined in C/C++ are continguous blocks of memory at a known, fixed location; if youy needed to be able to determine a linear address for some item either a part of the structure, or referenced explicitly by address using a pointer embedded in a structure, contiguity and static allocation were necessary elements of the structure. Whenever a thing referenced by a pointer could be relocated in memory did move, a mechanism to update the pointer to indicate the new location is needed. VFP manages this by using a double indirection that maps names to data representations through the NTI; if an allocation is shifted in memory, the NTI entry for the allocation is updated, so that the thing can be continuously referenced by it's name regardless of where it exists. Unfortunately, there's no way to track anything that might be a pointer that referenced that original allocation, so that if the data moved, even though the NTI reference remained consistant, pointers which referenced the absolute location would become invalid as a result of the shift in storage. That's the fundamental reason we lack an AddressOf() function for VFP references for memory representations (in addition, VFP's variant representation does not map smoothly into the standard data types supported by other languages.

>This structure can be passed around and edited with ease inside a program and used as either an entity or individual components.
>

By VFP, but not by non-VFP clients.
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