Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Paul Culbertson
  Where is Paul Culbertson?
 Texas - United States
 Paul Culbertson
 To: Mike Dershowitz
  Where is Mike Dershowitz?
 Pennsylvania - United States
 Mike Dershowitz
Subject: RE: Clearing array
Thread ID: 443 Message ID: 445 # Views: 4 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Wednesday, May 30, 2001 1:27:43 PM         

> I am working with an array that I populated, and now want to repopulate. Do I need to clear out the array before I repopulate it - meaning will it automatically expand to include the second set of data. If I do need to clear it out, what command must I use?

Well Mike clearing the array depends on how you are populating it.
If you are using a select statement into an array then no you don't need to clear it. There are many other command that create an array from other information like alines() that will recreate the array as well. If you are populating it some other way and need it cleared I generally define the array to 1 then define it again to the right size.

DIMENSION myarray[1]
DIMENSION myarray[6,2]

If anyone has a better way, please let us know.

Paul Culbertson

Home of the Visual FoxPro Experts

Houston, TX


Clearing array Posted by Mike Dershowitz @ 5/30/2001 1:04:12 PM
RE: Clearing array Posted by Paul Culbertson @ 5/30/2001 1:27:43 PM