Yuri,
I don't see that as a bug. If I wanted to see it that way than under the covers there are more that could be accepted as a bug. That's the cost you pay with single dimension arrays. It in fact looks like:
dimension aSingle[1,nelems]
ie:
dimension aTest[2]
aTest[1] = 1
aTest[2] = 2
? aTest[1,1]
? aTest[1,2]
? aTest[1,3]
? aTest[25,1]
Cetin
>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)
>?alen(a2,2)
>
>
>
>
>>
>>Yuri,
>>I think it's the way VFP works. Result would be the same if you appended tmp_array2 to a cursor (single row). So in effect excel sees it:
>>.Range(...).Cells.Value = 'ConstantValue'
>>
>>Whenever I work with append from or excel copy I redimension the array like this:
>>
>>Dimension tmp_array2[Alen(tmp_array2,1),Max(1,Alen(tmp_array2,2))]
>>
>>PS: To be more clear to Excel it's on a single row (single row, 200 columns):
>>.Cells(1,1),.cells(1,Alen(tmp_array2,1)).Value = ...
>>
>>Cetin