Predefined Functions – ubound
Function name: | ubound – Return array dimension |
Synopsis: | ubound(arr,dim) |
Input data type | Output data type |
---|---|
array, real | real |
Description:
The ubound function is used to returns the array dimension. The first argument to this function is an array, the second argument is an integer specifying the dimension (0,1,2,…), whose size you’d like to know.
Examples:
Suppose you would declare the following array:
array img[4] of real; img = array(30,40,10,15);
Then:
- ubound(img,0) would return 30
- ubound(img,1) would return 40
- ubound(img,2) would return 10
- ubound(img,3) would return 15