Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Assigning Arrays to other variables - and sorting them
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Assigning Arrays to other variables - and sorting them
Divers
Thread ID:
00091772
Message ID:
00091772
Vues:
61
I've got a class I'm developing that calculates various statistics from a bunch of different tables. One of the Methods generates an array that is built from this data. The array seems to work fine in the code, but when I attempt to assign it to a property in my object, all of the fields are duplicated.

Here's some code:

DO WHILE NOT EOF()
aShopL(nCount,1) = Shops.Name
shopnum = Shops.Num
THIS.Refresh && Forces all info to be recalculated
aShopL(nCount,2) = THIS.nActiveHours
(some code deleted)

aShopL(nCount,8) = THIS.nProdHrs_todate
aShopL(nCount,9) = THIS.nProdStatus
(some more code deleted)
ENDDO

= ASORT(aShopL,9,1)
THIS.aShopListing = aShopL

--------
The array should look like:
(1,1) = "Location 1" (1,9) = 1.5
(2,1) = "Location 2" (2,9) = 3.0
(3,1) = "Location 3" (3,9) = .5

I need to sort the array based on column 9 (using ASORT).
When I then do the "THIS.aShopListing = aShopL" all the columns are duplicated.

(1,1) = "Location 1"
(2,1) = "Location 1"
(3,1) = "Location 1"

What am I doing wrong??

Thanks,

-Paul
-Paul

RCS Solutions, Inc.
Blog
Twitter
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform