Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing row from array
Message
From
10/04/2018 04:40:06
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
10/04/2018 04:27:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01659245
Message ID:
01659278
Views:
115
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform