Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Arrays
Message
From
10/05/2002 13:42:35
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Arrays
Miscellaneous
Thread ID:
00655128
Message ID:
00655177
Views:
22
>Some times the names change order with that command... got any other ideas

Not sure if this is what you want :
Dimension myArray[5]
myArray=''
myArray[1]='john'
myArray[4]='jane'
myArray[5]='joe'

Disp memo like myArray

lnLen = alen(myArray)
For ix=1 to lnLen
  If empty(myArray[ix]) and ix < lnLen
    For jx = ix to lnLen
      If !empty(myArray[jx])
        myArray[ix]=myArray[jx]
        myArray[jx]=''
        Exit
      Endif
    Endfor
  Endif
Endfor
Disp memo like myArray
or :
Dimension myArray[5]
myArray=''
myArray[1]='john'
myArray[4]='jane'
myArray[5]='joe'

Disp memo like myArray
set exact on
do while ascan(myArray,"")>0
  adel(myArray,ascan(myArray,""))
enddo
set exact off
do while ascan(myArray,.f.)>0
  myArray[ascan(myArray,.f.)]=""
enddo
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform