Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing row from array
Message
De
10/04/2018 04:40:06
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
10/04/2018 04:27:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01659245
Message ID:
01659278
Vues:
113
>I can only guess. Maybe it's because Adel() alone is not sufficient, you must re-dimension the array afterwards.

It does what it does - deletes elements and shifts down all the elements above, initializing the last element/row of the array to .f. ... and now it's up to the programmer to decide what to do with that. Redimensioning to lose those trailing elements is one option; keeping a variable with last usable element/row is another (in cases when we may expect an ains() soon, this avoids multiple redimensioning); checking for element type is yet another. The 2nd option, I think, is the reason why adel() and ains() don't automatically redimension the array - it takes some time to do so, and it may actually be redundant.

Sometimes I wonder why Fox does some things and then the answer "because it was faster that way on a 286" pops up.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform