Decimal (config): Difference between revisions

From BR Wiki
Jump to navigation Jump to search
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
The BRConfig.sys DECIMAL spec 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:
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
  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 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.
The following table compares the acceptable values for NUMBER when DECIMAL REQUIRED is active versus when DECIMAL ASSUMED is active.
Line 24: Line 26:


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.
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.


<noinclude>
<noinclude>
[[Category:Config]]
[[Category:Config]]
</noinclude>
</noinclude>

Latest revision as of 21:21, 27 July 2015

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.

Value entered (using N 7.2) DECIMAL REQUIRED DECIMAL ASSUMED
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.