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

5-5
a SHORT INTEGER. This is the number of the bit to be
extracted from
N1
.
Examples
The example below shows a bit layout for N1. It shows the results of the
BITLR function for several values of the second parameter (
N2
).
Bit Number: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
N1= 0 1 1 0 0 1 0 1 0 0 0 1 1 1 0 1
BITLR(N1,15)=1, BITLR(N1,11)=1, BITLR(N1,8)=0, BITLR(N1,3)=0
BITRL
The BITRL function returns the value of a particular bit of an
expression, where 15 is the Most Significant (or leftmost) bit. The
result is a SHORT INTEGER.
Syntax
BITRL(
N1
,
N2
)
Parameters
N1
Binary representation of a numeric expression. This is
a SHORT INTEGER. This is the number containing the bit
to be extracted.
N2
Binary representation of a numeric expression. This is
a SHORT INTEGER. This is the number of the bit to be
extracted from
N1
.
Examples
The example below shows the bit layout for N1. It shows the result of
the BITRL functions for several values of the second parameter (
N2
).
Bit Number: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
N1= 0 1 1 0 0 1 0 1 0 0 0 1 1 1 0 1
BITRL(N1,15)=0, BITRL(N1,11)=0, BITRL(N1,8)=1, BITRL(N1,3)=1
BRK
The BRK function returns the status that BREAK and CONTROL Y (halt) had
before the BRK function was called. It can also change the status of
these, depending on the value of the argument passed. BRK is a Boolean
function that returns the value TRUE (one) or FALSE (zero).
Syntax
BRK (
num_expr
)
Parameters
num_expr
This value determines whether BRK changes the status of
BREAK and CONTROL Y, as follows:
num_expr
Status of BREAK and CONTROL Y
Negative Does not change status
Zero Disables both
Positive Enables both
The BRK function returns:
TRUE (one) If BREAK and CONTROL Y were enabled before the BRK
function was called.
FALSE (zero) If BREAK and CONTROL Y were disabled before the BRK
function was called.
When BREAK is enabled, pressing BREAK causes the operating system to
suspend HP Business BASIC/XL. The operating system command :RESUME