Returns object of class size_t containing the dimensions of
input argument X if invoked with a single argument. Returns
integer value of specified dimension if invoked with two arguments.
If dimen specifies a higher dimension than exists, returns 1
representing the singleton dimension.