Non, pas vraiment. Il faudrait utiliser Ubound sur chaque dimension de l’array et retourner le numero le plus haut. Ubound a un deuxieme parameter (optional) ave lequel on peut especifiquer la dimension dont on veut calculer la grandeur.
Since my French is getting too rusty for the forum, I’ll reply in English too. There isn’t a direct equivalent of that function. You wiil need to use Ubound to query the size of each dimension of the array, and then get the maximum.
If you always know the number of dimensions of the array it’s easy, just something like this:
[code]Dim mLength,i as integer
For i= 1 to NumberOfDimensions
mLength=max(Ubound(MyArray,i),mLength)
Next i[/code]
If you don’t know the number of dimensions (is this even possible?), maybe a try-catch block could be the solution (I have never done this, I am not sure it is correct, just an idea):
[code]Try
dim mLength,i as integer
while true
mLength=max(Ubound(MyArray,i),mLength)
wend
Pour savior combien de dimensions il y a, on emploie UBound avec deuxime paramtre -1. Donc:
dim valeur, k as integer
valeur = -1
For k = ubound(tableau,-1) downto 1
valeur = max(valeur,ubound(tableau,k))
Next
return valeur+1 //UBound donne l'indice du dernier lment, qui est infrieur la quantit d'lments par 1 puisque les Array de Xojo sont compts partir de 0
System.DebugLog "max value = " + mx.ToText[/quote]
Je viens de vrifier la fonction Length qui en fin de compte doit retourner le n de la plus grande valeur auquel est associe la variable tableau, cad entre 1 et N.