Decimal (config)

From Br Wiki
Jump to: navigation, search

The DECIMAL BRConfig.sys specification allows you to require the operator to type a decimal point when entering a numeric value that is formatted to include a fraction. This specification affects INPUT FIELDS/RINPUT FIELDS statements where the format of the numeric variable is X.X, as in the following example:

00010 INPUT FIELDS "10,10,N 7.2,R":NUMBER

The DECIMAL spec uses one of two parameters:

  • ASSUMED (the start-up default), or
  • REQUIRED. When DECIMAL REQUIRED is active, the operator needs to enter a decimal point for the above INPUT FIELDS value, only if a fractional part of a number is desired.

The following table compares the acceptable values for NUMBER when DECIMAL REQUIRED is active versus when DECIMAL ASSUMED is active.

1234.56 1234.56 1234.56
1234 56 err 0002 1234.56
123456 err 0002 1234.56
1234 1234.00 notice 12.34
1234. 1234.00 1234.00

The difference occurs when a decimal point is not entered. The DECIMAL spec may also be specified by the CONFIG command while Business Rules! is active.

It can also be used with the Config command or within a program line using the Execute statement.