HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
5- 6
restarts HP Business BASIC/XL. If CONTROL Y is enabled and pressed and a
program is being executed, a message is printed indicating that HALT was
pressed and control is returned to the HP Business BASIC/XL interpreter.
If CONTROL Y is pressed while in the HP Business BASIC/XL interpreter,
only the message is printed.
When BREAK and CONTROLY are disabled, pressing either has no result.
Examples
10 Was_enabled=BRK(-1) !BRK does not change status
11 Was_enabled=BRK((10+10)-(10*10)) !BRK does not change status
20 Was_enabled=BRK(0) !Disables BREAK and CONTROL Y
21 Was_enabled=BRK((X-Y)-(X+(-Y))) !Disables BREAK and CONTROL Y
30 Was_enabled=BRK(1) !Enables BREAK and CONTROL Y
31 Was_enabled=BRK(ABS(X)) !Enables BREAK and CONTROL Y
!(if X != 0)
40 Was_enabled=BRK(X) !Action depends on value of X
50 IF BRK(X) THEN GOTO 100 !Action depends on value of X
BUFTYP Function
The BUFTYP function returns the number that represents the type of the
next item in the input buffer. See the INPUT statement in chapter 4 for
an explanation of the input buffer. The BUFTYP function returns the same
numeric values representing HP Business BASIC/XL data types returned by
the DATATYP and TYP functions (see Table 5-1).
Table 5-1. Numbers Representing Input Data Types
--------------------------------------------------------------------------------------------
| | |
| BUFTYPE | Type of Next Item in |
| Result | DATA Statement or Input |
| | Buffer |
| | |
--------------------------------------------------------------------------------------------
| | |
| 1 | DECIMAL |
| | |
--------------------------------------------------------------------------------------------
| | |
| 2 | Entire string |
| | |
--------------------------------------------------------------------------------------------
| | |
| 4 | End-of-record (EOR) mark |
| | |
--------------------------------------------------------------------------------------------
| | |
| 5 | SHORT INTEGER |
| | |
--------------------------------------------------------------------------------------------
| | |
| 11 | INTEGER |
| | |
--------------------------------------------------------------------------------------------
| | |
| 13 | REAL |
| | |
--------------------------------------------------------------------------------------------
Syntax
BUFTYP
The BUFTYP function determines the type of a numeric datum by its format,
whether it contains a decimal point or is expressed in scientific
notation, its value, and the default numeric type.
Table 5-2 explains how BUFTYP determines the type of a numeric datum.