Question How to increase decimal limit?

Rajendran_

New Member
Hello,

I have a piece of code which has decimal value with 4 whole-number and 5 decimal value (5608.90585). When I display this decimal value, its displayed as 5,608.9059. But I want to display it as 5608.90585. It might be a silly question but I couldn't find anything to increase it's limit.

Please note that I don't want to change my decimal format. It has to be "->,>>>,>>9.9<<<<<<<<" and I want the value to be displayed as is - 5608.90585.

Code:
define variable dcQty as decimal format "->,>>>,>>9.9<<<<<<<<" Label "Qty" no-undo .

dcQty = 5608.90585 .

repeat :
if dcQty = 0  then leave .
display dcQty with frame a .
update dcQty with frame a side-labels .
end.

upon running this code, I get a prompt like below.
┌─────────────────┐
│Qty: 5,608.9059 │
└─────────────────┘


But I want the prompt like
┌─────────────────┐
│Qty: 5,608.90585 │
└─────────────────┘
 

Stefan

Well-Known Member
From the docs:
Used in conjunction with > to implement floating-decimal format. The < character (up to 10) must appear to the right of the decimal and be balanced by an equal or greater number of > characters left of the decimal. A digit is displayed in a position formatted with < when the corresponding > is a leading zero (and the stored value has the required precision).
I'm not sure about this balancing act, but if you add an additional > to the left of your decimal point, it creates extra space to show the < on the right.
 

Osborne

Active Member
I have previously had this exact problem and the change that Stefan posted appears to be the only option. If you change to this it works:
Code:
define variable dcQty as decimal DECIMALS 6 format "->>,>>>,>>9.9<<<<<<<<" Label "Qty" no-undo.
As Stefan says it is a balancing act and maybe not ideal to actually increase the format like this.
 
Top