| Summary: | Expect extra decimals to be truncated rather than rounded | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Kathy Carroll <carrollk> |
| Component: | EDT | Assignee: | Project Inbox <edt.javagen-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | broy2, jeffdouglas, jqian |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
fixed verified with 201111110901 and closed |
JavaScript and Java should work the same for this example. Currently they aren't the same so I went to RBD to break the tie. (Tim says they should work the same based on the default rounding we use which is hard coded for 070 like overflow) In RBD, truncateExtraDecimals build descriptor option toggled this option and its default is YES. I think the default behavior in EDT should be the same. That would mean the following code should produce "good" dec1 decimal(5,2) = 123.45666; dec2 decimal(5,2) = 123.45111; if (dec1 == dec2) syslib.writestdout("good"); else syslib.writestdout("bad"); end An interesting note is that JavaScript in RBD doesn't honor the truncateExtraDecimal option. Jeff, if you don't think it is possible to change java gen to support this behavior would you please change the component to language?