08-11-2022, 08:25 PM
It represent it mathematically correctly in Visual Basic 5.0. Then that probably also applies to QuickBasic 4.5.
There is a bug in the QB64 math rounding routines.
There is a bug in the QB64 math rounding routines.

Code: (Select All)
Option Explicit
Private Sub cmdCommand_Click()
Dim Zahl1, Zahl2, Ergebnis As Double
Ergebnis = Val(txtZahl1.Text + txtZahl2.Text)
txtErgebnis.Text = Format$(Ergebnis, "###.##")
End Sub
Private Sub cmdEnde_Click()
End
End Sub
Private Sub cmdLoeschen_Click()
txtZahl1.Text = ""
txtZahl2.Text = ""
txtErgebnis.Text = ""
End Sub
![[Image: Korrektes-Runden2022-08-11-221242.jpg]](https://i.ibb.co/B2vMgZF/Korrektes-Runden2022-08-11-221242.jpg)