Bug #5587
Decimal format not handled properly
0%
History
#2 Updated by Roger Borrello over 2 years ago
- File 4984_chui_comparison.png added
- Subject changed from Decimal format sign not handled properly to Decimal format not handled properly
The display output for a decimal fill-in does not match the 4GL.
In ChUI, we are not handling user data correctly.
Take this example (./uast/sterling.p
):
def var naked1 as decimal init 12.34. def var naked2 as decimal init 43.21. def var sterl1 as decimal init 12.34. def var dollar1 as decimal init 12.34. def var sterl2 as decimal init 43.21. def var dollar2 as decimal init 43.21. define frame f1 naked1 at row 1 col 8 colon-aligned format "->,>>>,>>9.99" view-as fill-in naked2 at row 2 col 8 colon-aligned format " ->,>>>,>>9.99" view-as fill-in sterl1 at row 3 col 8 colon-aligned format "£->,>>>,>>9.99" view-as fill-in dollar1 at row 4 col 8 colon-aligned format "$->,>>>,>>9.99" view-as fill-in sterl2 at row 5 col 8 colon-aligned format " £->,>>>,>>9.99" view-as fill-in dollar2 at row 6 col 8 colon-aligned format " $->,>>>,>>9.99" view-as fill-in with 1 down side-labels. display naked1 naked2 sterl1 dollar1 sterl2 dollar2 with frame f1. /*display naked1 naked2 with frame f1.*/ output to ./sterling.txt. message "naked1="string(naked1, "->,>>>,>>9.99"). message "naked2="string(naked2, " ->,>>>,>>9.99"). message "sterling1="string(sterl1, "£->,>>>,>>9.99"). message "dollar1="string(dollar1, "$->,>>>,>>9.99"). message "sterling2="string(sterl2, " £->,>>>,>>9.99"). message "dollar2="string(dollar2, " $->,>>>,>>9.99").
In ChUI, we get this, where we don't seem to do anything with the user data:
#3 Updated by Roger Borrello over 2 years ago
Another issue related to format is we don't give an error condition that the 4GL does.
In the testcase mentioned in #5587-2, I had longer fill-in names sterling1
and sterling2
. When I tried 4GL ChUI, I received Cannot fit FILL-IN ... (4027)...
error. Apparently there's a different limit set for the label size in ChUI versus GUI. I upped the label length by making it mysterling1 and received the same error on Progress GUI.
No such error on FWD in ChUI or GUI.
#4 Updated by Roger Borrello over 2 years ago
- File 4984_tight_colon-aligned_4gl.png added
- File 4984_tight_colon-aligned_fwd.png added
Another issue is the alignment of side-labels is a little off in GUI when colon-aligned
is set. The alignment doesn't match the longest label like in the 4GL:4GL
FWD
#5 Updated by Roger Borrello over 2 years ago
- File 5587_extra_space.png added
Another issue is the extra space that comes between the user data, and the first digit. It appears that the sign is replaced with a space, when it may need to be replaced with a null.
Here is a minor update to the testcase, and resultant output comparison:
def var naked1 as decimal init 12.34. def var naked2 as decimal init 43.21. def var sterl1 as decimal init 12.34. def var sterl2 as decimal init 43.21. def var dollar1 as decimal init 12.34. def var dollar2 as decimal init 43.21. define frame f1 naked1 at row 1 col 8 colon-aligned format "->,>>>,>>9.99" view-as fill-in naked2 at row 2 col 8 colon-aligned format " ->,>>>,>>9.99" view-as fill-in sterl1 at row 3 col 8 colon-aligned format "£->,>>>,>>9.99" view-as fill-in sterl2 at row 5 col 8 colon-aligned format "£ ->,>>>,>>9.99" view-as fill-in dollar1 at row 4 col 8 colon-aligned format "$->,>>>,>>9.99" view-as fill-in dollar2 at row 6 col 8 colon-aligned format "$ ->,>>>,>>9.99" view-as fill-in with 1 down side-labels. display naked1 naked2 sterl1 sterl2 dollar1 dollar2 with frame f1.
#6 Updated by Roger Borrello over 2 years ago
I am going to compare how the NumberType.toString
handles the format, since the message comes out without the space instead of the negative sign.
#7 Updated by Roger Borrello over 2 years ago
- Assignee set to Roger Borrello
- Status changed from New to WIP