Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving names in an array
Message
From
10/05/2002 17:47:21
 
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00654879
Message ID:
00655291
Views:
23
Since ADEL() physically moves the rows, don't you have to process the array from the bottom up?
for i = alen( laNames ) to 1 step -1
   if ( empty( laNames[i] ) )
      adel( laNames, i )
   endif
endfor
>Mike,
>
>
for i = 1 to alen( laNames )
>   if ( empty( laNames[i] ) )
>      adel( laNames, i )
>   endif
>endif
>
>If the array is a lot larger you can add some early out logic.
>
>>I am trying to write a program using an array that will but the names in my fields in topdown order.
>>
>>example
>>name1 = john
>>name2 =
>>name3 =
>>name4 = jane
>>name5 = joe
>>
>>I want to move the names so the come out like this.
>>name1 = john
>>name2 = jane
>>name3 = joe
>>name4 =
>>name5 =
>>
>>How would I do this in an array? Can anyone help..
>>
>>
>>Thanks in advance...
>>
>>name5 =
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform