Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing row from array
Message
De
10/04/2018 14:05:38
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
10/04/2018 12:12:28
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:
01659293
Vues:
107
>And of course one needs to carefully read the documentation. While we might be aware of when we delete rows/elements in an array and all the trailing items are "shifted," the same does NOT occur when you delete a column in a 2-dimensional array.
>https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/b26a3deh%28v%3dvs.71%29
>in the Remarks: "... If you delete a column, values of the elements in the deleted column are set to False (.F.), but trailing elements are not moved."
>
>Update: just tried out quick experiment
>
dimension afoo[3,3]
>afoo[1]="one"
>afoo[2]="two"
>afoo[3]="three"
>afoo[4]="four"
>afoo[5]="five"
>afoo[6]="six"
>afoo[7]="seven"
>afoo[8]="eight"
>afoo[9]="nine"
>display variable afoo
>list memory like afoo
>? ains(afoo,2,2)
>list memory like afoo
>? adel(afoo,2,2)
>list memory like afoo
>
>
>the results do seem to indicate that when you use ADEL() to delete a column, the trailing elements of each row *are* shifted.

Ha! So they are shifted but, ahem, horizontally. Well, in these 20 years with Fox, never tried that - good to know what it does.

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