Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Loopin a variable length array
Message
From
22/02/1999 00:31:18
 
 
To
20/02/1999 17:06:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00189697
Message ID:
00189874
Views:
12
Treat the array as a LIFO stack:
do while !isnull(this.ToDoObjects[1])
    lnTopOfStack = alen(this.ToDoObjects)
    loCurrent = this.ToDoObjects[lnTopOfStack]
    loTopOfStack = lnTopOfStack - 1
    if lnTopOfStack = 0
        this.todo[1] = null
    else
        dimension this.ToDoObjects[lnTopOfStack]
    endif
    * do whatever with loCurrent
enddo
If you don't want to constantly redimension the array, create and maintain a corresponding ToDoObjectCount property.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform