Determining the dimensions of an array

Lets suppose that I receive in a function as a parameter an array.
Something like this:

Function ArrayIn(Array() as Integer)

End Function

Is it possible to know inside the function the number of dimensions of the array “Array()”?
Thanks very much in advance for any help.

array is an basic-builtin-function … its a bad idea to call it inside the signatur of ArrayIn


There is → UBound Function

Also → [SOLVED] Ubound(Array()) doesn't work to know how many elements has the Array with method .getDataArray()

Also just tested one from Open Office Macros Explained by A. Pitonyak (see → Code is in Listing 101 on page 120. Result of test:

Screenshot at 2022-08-07 18-12-37

Hi Ratslinger,
Thanks for your suggestions.
It seems that A. Pitonyak example solves the question.
The idea behind the solution is to test the UBound of the dimensions till it gets an error.
Best regards.