> >

> >

> > Koen, you lost me completely. Can you give me an example?

> > Tony

>

>

> Tony,

> now I am lost, I give you even the complete text of the helpfile and you ask me for an example???

>

> with dimension myArray(n) you create an array with n elements. So if you create an array dimension myArray(1) you have n element. All the elements are by default .F.

> To see howmany elements there are in your array you query for the length of the array, so alen(myArray) will give you a number and if the number is 0 ? Than there is no length = no array. Easy in VFP dont you think?

>

> Koen

What does that mean, Koen?

How can you make the difference with ALEN()? It returns same values if an element "exists" (has a value set) or not.

CLEAR
DIMENSION aArr[1]
?ALEN(aArr) && returns 1
?ALEN(aArr,1) && returns 1
?ALEN(aArr,2) && returns 0
RELEASE aArr
?
DIMENSION aArr[1]
aArr[1]="A" && -> element has a value set.
?ALEN(aArr) && returns 1
?ALEN(aArr,1) && returns 1
?ALEN(aArr,2) && returns 0
RELEASE aArr
?
* Multi col
DIMENSION aArr[1,1]
?ALEN(aArr) && returns 1
?ALEN(aArr,1) && returns 1
?ALEN(aArr,2) && returns 1
RELEASE aArr
?
DIMENSION aArr[1,1]
aArr[1,1]="A" && -> element has a value set.
?ALEN(aArr) && returns 1
?ALEN(aArr,1) && returns 1
?ALEN(aArr,2) && returns 1
RELEASE aArr

Regards

Samir