HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
5- 30
number of rows is the number of elements. Otherwise, the number of rows
is the size of the dimension that is second from the right in the
dims
of
the DIM statement. The result is an integer value by default.
Syntax
ROW(
array
)
Parameters
array
Structured collection of variables of the same type.
The structure is determined when the array is declared.
String variable names are suffixed with a "$".
Examples
OPTION BASE 1 is assumed.
A(2,2): 1 2 B(2,4): 1 2 3 4 C(4,3,2): 1 2 0 4 0 0 1 2
4 5 5 6 7 8 5 1 1 0 4 5 0 0
2 0 3 2 1 2 0 1
D(3,3): 1 0 1 E(2,2): 8 3 F(5): 5 4 3 2 1
3 5 7 4 7
9 0 9
ROW(A) = 2
ROW(B) = 2
ROW(C) = 3
ROW(D) = 3
ROW(E) = 2
ROW(F) = 5
RPOS
RPOS is a numeric function that returns the number of the row where the
cursor is currently located. An integer in the range of one through the
maximum number of lines in your terminal's display memory is returned.
If your terminal has two pages of display, the value 48 is returned if
the cursor is located on the last line of display memory. The program
fragment:
100 CURSOR (999) !Position the cursor
120 T_rows = RPOS !Moment of truth; how much display memory?
can be used to find the number of lines of display memory in a terminal.
However, if the value 999 is returned, your terminal may have exceeded
the valid display memory range for these statements. HP Business
BASIC/XL determines cursor position by reading the position from the
terminal. So, typing on the keyboard during the execution of an RPOS
statement may cause an error.
Syntax
RPOS
Examples
300 PRINT RPOS
RPT$
The RPT$ function returns a string that results from concatenating a specified string a specified number of times.
Syntax
RPT$(S $,N )