Jens,

Wouldn't changing the UBound() function be a backwards compatibility issue?

Although I can see that returning the number of dimensions in an array would be very useful, wouldn't it have to be implemented as a separate function?

Also, in your example wouldn't the number of dimensions of your array $b be 4? I believe that your array $a should return a value of 1 - one dimension.

Maybe I'm getting the wrong end of the stick!

Lee

code:
Function NumOfDimensions($Array)
$NumOfDimensions = 0

While UBound($Array, $NumOfDimensions + 1) <> -1
$NumOfDimensions = $NumOfDimensions + 1
Loop
EndFunction