FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
array_ubound.c
Go to the documentation of this file.
1
/* ubound function */
2
3
#include "
fb.h
"
4
5
FBCALL
ssize_t
fb_ArrayUBound
(
FBARRAY
*array, ssize_t dimension )
6
{
7
/* given dimension is 1-based */
8
dimension -= 1;
9
10
/* out-of-bound dimension? */
11
if
( (dimension < 0) || (dimension >= array->
dimensions
) ) {
12
/* ubound( a, 0 ) returns the array's dimension count.
13
Any other out-of-bound dimension value returns -1.
14
(see also fb_ArrayLBound()) */
15
return
dimension == -1 ? array->
dimensions
: -1;
16
}
17
18
return
array->
dimTB
[dimension].ubound;
19
}
rtlib
array_ubound.c
Generated on Thu Jan 23 2014 19:40:07 for FreeBASIC by
1.8.4