Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array Dimensions - Confusing VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00687552
Message ID:
00687864
Vues:
19
Thanks for the Answer...
I can determine if I have a ONE or Two dimensional Array with this

llTwoDimensions = alen(MyArray)#alen(MyArray,1)

my problem was this:

for i=1 to alen(MyArray,1)
?MyArray(i,1) &&This always delivered the first value of 1 Dimensional Arrays
endfor

I think it still is a Bug if I get no error for this:

dimension myArray(3)
myArray(1)=1
myArray(2)=2
myArray(3)=3

?myArray(3,1) &&Should at least give me an error but NOT the value 1
?myArray(3,2) &&Should at least give me an error but NOT the value 2

*Because Foxpro seems to use
*myArray(1,1)=1,myArray(1,2)=2,myArray(1,3)=3
*myArray(2,1)=1,myArray(2,2)=2,myArray(2,3)=3
*myArray(3,1)=1,myArray(3,2)=2,myArray(3,3)=3
*But why does alen(myArray) give me 3 then?
?myArray(999999,3) Even gives me 3... I don't understand that.
Marvin Blase (tA-logistic Software GmbH)
You'll never notice the good things if you haven't seen the bad.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform