Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
#EXPORT does not generate the type correctly for decimal types when the number of decimal places is specified. I suspect this is due to the fact that the code looks for the last non-digit character in the string literal (ecltype) for the type and truncates to that point. Instead, it should be looking for the first digit in the string literal.
Consider this example:
decimalRec := RECORD
DECIMAL3 A;
DECIMAL3_1 B;
END;
LOADXML('<xml/>'); //"dummy" just to open an XML scope
#DECLARE(out);
#EXPORT(out, decimalRec);
OUTPUT(%'out'%);
This generates the following output:
<Data>
<Field ecltype="decimal3"
label="a"
name="a"
position="0"
rawtype="131075"
size="2"
type="decimal"/>
<Field ecltype="decimal3_1"
label="b"
name="b"
position="1"
rawtype="131075"
size="2"
type="decimal3_"/>
</Data>