Ld_amount=double (sle_amount. Text)
Messagebox (' ', a string (Truncate (ld_amount, 2)))
Why is 9.19? I tried the other number from 1 to 9, 9.2, and 9.7 is wrong, why? To solve the
CodePudding user response:
Why use a Double, should use a decimal wouldn'tCodePudding user response:
Sle_amount. Text='9.2'Ld_amount=double (sle_amount. Text)
Messagebox (' ', a string (Truncate (ld_amount, 2)))
Instead of
Dec {2} ldc_data
Sle_amount. Text='9.2'
Ldc_data=https://bbs.csdn.net/topics/dec (sle_amount. Text)
Messagebox (' ', a string (Truncate (ldc_data, 2)))