bas7advr.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
UBOUND Function Details
◄Syntax► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
UBOUND returns the upper bound (largest available subscript) for the
indicated dimension of an array.
UBOUND(array[,dimension%])
Usage Notes
■ The UBOUND function is used with the LBOUND function to determine
the size of an array.
■ UBOUND returns the values listed below for an array with the
following dimensions:
DIM A(1 TO 100, 1 TO 3, -3 TO 4)
Invocation Value returned
═══════════ ══════════════
UBOUND(A,1) 100
UBOUND(A,2) 3
UBOUND(A,3) 4
■ You can use the shortened syntax UBOUND(array) for one-dimensional
arrays because the default value for dimension% is 1.
■ Use the LBOUND function to find the lower limit of an array
dimension.