Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy VFP Array to Excel
Message
De
09/12/2005 16:41:21
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01076673
Message ID:
01076768
Vues:
29
>Cetin,
>
>Yes, I understand that VFP works this way, but why? It look like a bug to me:
>
>
>dimension a1[200]
>dimension a2[200,1]
>
>One may then ask, how many columns there are in a1 and in a2?
>
>?Alen(a1,2)  && returns 0   ??
>?alen(a2,2)  && returns 1
>
>
Yuri, a bug is sure.

When VFP use a array in COPY/APPEND/... commands
it see a one dimensional array as a "one row x N columns"
CLEAR
DIMENSION onedimension[2] && bug VFP see this as [200,0] but correct is [1,200]

? ALEN(onedimension,1),ALEN(onedimension,2) && 2,0

onedimension[1] = 1
onedimension[2] = 3

CREATE CURSOR TEST (AA I,BB I)
APPEND FROM ARRAY ONEDIMENSION && HERE VFP USE onedimension[1,2] 
BROWSE
* then expected output of
* ? ALEN(onedimension,1),ALEN(onedimension,2)
* is 1,2
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform