修复错误

pull/1/head
PJ568 2 years ago
parent 418d70f294
commit 1911ee9feb

@ -118,7 +118,8 @@ func 按下退格():
func (): func ():
if : if :
() ()
.text = .text
= .text.to_float() = .text.to_float()
= "/" = "/"
.text = str() + .text = str() +
@ -129,7 +130,8 @@ func 按下除():
func (): func ():
if : if :
() ()
.text = .text
= .text.to_float() = .text.to_float()
= "*" = "*"
.text = str() + .text = str() +
@ -140,7 +142,8 @@ func 按下乘():
func (): func ():
if : if :
() ()
.text = .text
= .text.to_float() = .text.to_float()
= "-" = "-"
.text = str() + .text = str() +
@ -151,7 +154,8 @@ func 按下减():
func (): func ():
if : if :
() ()
.text = .text
= .text.to_float() = .text.to_float()
= "+" = "+"
.text = str() + .text = str() +
@ -174,7 +178,10 @@ func 按下点():
func (): func ():
使 = false 使 = false
var : float var : float
= .text.to_float() if .text.right(1) == "=":
= .text.to_float()
else:
= .text.to_float()
match : match :
"+": "+":
= + = +
@ -187,11 +194,7 @@ func 等于():
.text = str() + + str() + "=" .text = str() + + str() + "="
.text = str(snappedf(, 0.0000000001)) .text = str(snappedf(, 0.0000000001))
= false = false
= false
func ():
()
.text = .text
func _on__pressed(): func _on__pressed():

Loading…
Cancel
Save