HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)

5-11
12 13 16 9
CURKEY
The CURKEY function returns the integer value of the last
branch-during-input key pressed. If the value returned is 0, then no
branch-during-input keys have been pressed during the execution of the
program. The value returned representing a key is in the range [1, 8].
Syntax
CURKEY
Example
100 PRINT CURKEY !Prints the value of the last branch-during-input
105 !key pressed.
110 IF CURKEY > 0 THEN ENABLE !If a branch-during-input key was pressed,
115 !then the branch occurs.
DAT3000$
The DAT3000$ function returns a substring of the date string returned by
the HP 3000 DATELINE intrinsic. On the HP 3000 under MPE XL, the date
string is a string of 27 characters with the following format:
MON, MAR 3, 1986, 12:44 PM
Syntax
DAT3000$ (
num_expr1
,
num_expr2
)
Parameters
num_expr1
A numeric expression that evaluates to the position of
the first character of the date string.
num_expr2
A numeric expression that evaluates to the position of
the last desired character of the date string.
Both
num_expr1
and
num_expr2
must evaluate to a value in
the range of [1, 27], inclusive. The value of
num_expr1
must be less than or equal to the value of
num_expr2
.
If any of these conditions is violated an error occurs.
Examples
10 A$=DAT3000$(1,17)
15 PRINT "12345678901234567"
20 PRINT A$
99 END
The above program prints:
12345678901234567
MON, MAR 3, 1986
10 A$=DAT3000$(1,10)
15 PRINT "1234567890"
20 PRINT A$
99 END
The previous program prints:
1234567890
MON, MAR
DATATYP
The DATATYP function returns a number that represents the data type of
the next value to be read from a DATA statement (see Table 5-3).