Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy VFP Array to Excel
Message
From
09/12/2005 16:41:21
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01076673
Message ID:
01076768
Views:
28
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform