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

4- 40
Examples
The following examples show the result of using the DEFAULT ON statement.
In the first example, the program does not have DEFAULT ON and a short
integer precision overflow results. In the second example, there is a
DEFAULT ON statement and the default value of 32767 is substituted for
the out of range 2*A.
>list
10 SHORT INTEGER A,B
20 A=32767
30 B=2*A
40 PRINT A
50 PRINT B
60 END
>run
Error 20 in line 30
SHORT INTEGER precision overflow.
>15 DEFAULT ON
>list
10 SHORT INTEGER A,B
15 DEFAULT ON
20 A=32767
30 B=2*A
40 PRINT A
50 PRINT B
60 END
>run
32767
32767
>
DEG
The DEG statement indicates that angular units will be specified in
degrees. The default is Radians. One degree represents 1/360 of a
circle. This statement is used with trigonometric functions.
Syntax
DEG
Example
10 Radius = 10
20 DEG
30 Area = PI*Radius**2
40 PRINT Area
50 END
DETAIL LINE
The DETAIL LINE statement is the foundation for Report Writer execution.
When the DETAIL LINE statement is executed, all break conditions are
tested and triggered, if appropriate, before the detail line output is
produced. In addition, this statement causes all totals to be
incremented.
This statement can not occur within a report definition. Also, it can
not be executed while any other break condition such as a level break or
a page break is being executed.
Syntax
[ [LINES]]
DETAIL LINE
totals_flag
[WITH
num_lines
[LINE ]]
[USING
image
[;
output_list
]]
Parameters
totals_flag
A numeric expression in the SHORT INTEGER range. This
value is used as a Boolean to determine what work must