transpiler icon indicating copy to clipboard operation
transpiler copied to clipboard

String conversion of float

Open mbtools opened this issue 3 years ago • 1 comments
trafficstars

data f type f.
data out type string.
f = '10.239'.
out = |f = { f }|.
write / out.
out = |f = { f decimals = 2 }|.
write / out.

output: f = 1,2390000000000000E+01 f = 1,2390000000000000E+01

expected: f = 10.2390000000000001 10.239 should be ok too since floats are platform dependent f = 10.24

Note: you get E+xx in ABAP if you use exponent = n in the template (for n <> 0).

mbtools avatar Mar 30 '22 11:03 mbtools

related, but not identical = https://github.com/abaplint/transpiler/issues/673

larshp avatar Mar 30 '22 11:03 larshp

@mbtools try again, 2.2.18

larshp avatar Oct 11 '22 15:10 larshp

👍

mbtools avatar Oct 11 '22 16:10 mbtools