UBOUND returns the largest available subscript for an array dimension. If no dimension is specified, UBOUND should return the largest available subscripts for ALL dimensions if the array has multiple dimensions. For example
code:
dim $a[5], $b[1,2,3,4]

$sizea = ubound($a)
$sizeb = ubound($b)

$sizea should have a return value of 5 and $sizeb should be an array of size 3 with $sizeb[0]=1, $sizeb[1]=2, $sizeb[2]=3, and $sizeb[3]=4 instead of just returning the size for the first dimension.

Thus, UBOUND could be used to determine the number of dimensions of an array.
_________________________
There are two types of vessels, submarines and targets.