请高手帮我解释下一个程序的每一条语句的意思?谢谢!
PrivateSubCanshuCal(t1AsSingle,t2AsSingle)DimdeltaTAsSingledeltaT=t1-t2TxtEtc2.Text="...
Private Sub CanshuCal(t1 As Single, t2 As Single)
Dim deltaT As Single
deltaT = t1 - t2
TxtEtc2.Text = "±" & Format(Etc(Abs(deltaT)), "0.000") & "%"
TxtQ.Text = Format(ReLiang(TxtLiuLiang.Text, t1, t2), "0.0000")
TxtDeltaQ.Text = "±" & Format(TxtQ.Text * Etc(Abs(deltaT)) / 100, "0.0000")
TxtQ2.Text = "[" & Format(TxtQ.Text * (1 - Etc(Abs(deltaT)) / 100), "0.0000") & "~" _
& Format(TxtQ.Text * (1 + Etc(Abs(deltaT)) / 100), "0.0000") & "]"
TxtQ1.Text = Format(Val(TxtQ.Text) / 3.6, "0.0000")
TxtDeltaQ1.Text = "±" & Format(TxtQ1.Text * Etc(Abs(deltaT)) / 100, "0.0000")
TxtQ3.Text = "[" & Format(TxtQ1.Text * (1 - Etc(Abs(deltaT)) / 100), "0.0000") & "~" _
& Format(TxtQ1.Text * (1 + Etc(Abs(deltaT)) / 100), "0.0000") & "]"
TxtWencha.Text = Format(deltaT, "0.000")
TxtDeltaT.Text = "±" & Format(Abs(deltaT) * Etc(Abs(deltaT)) / 100, "0.0000")
TxtWencha1.Text = "[" & Format(Val(deltaT) * (1 - Etc(Abs(deltaT)) / 100), "0.000") & "~" _
& Format(Val(deltaT) * (1 + Etc(Abs(deltaT)) / 100), "0.000") & "]"
TxtJSMidu.Text = Format(Midu(t1), "0.000")
TxtHSMidu.Text = Format(Midu(t2), "0.000")
TxtM.Text = Format(Val(TxtJSMidu.Text) * Val(TxtLiuLiang.Text), "0.0000")
TxtJSHanzhi.Text = Format(Hanzhi(t1), "0.0000")
TxtHSHanzhi.Text = Format(Hanzhi(t2), "0.0000")
TxtHanCha.Text = Format(Val(TxtJSHanzhi.Text) - Val(TxtHSHanzhi.Text), "0.0000")
End Sub 展开
Dim deltaT As Single
deltaT = t1 - t2
TxtEtc2.Text = "±" & Format(Etc(Abs(deltaT)), "0.000") & "%"
TxtQ.Text = Format(ReLiang(TxtLiuLiang.Text, t1, t2), "0.0000")
TxtDeltaQ.Text = "±" & Format(TxtQ.Text * Etc(Abs(deltaT)) / 100, "0.0000")
TxtQ2.Text = "[" & Format(TxtQ.Text * (1 - Etc(Abs(deltaT)) / 100), "0.0000") & "~" _
& Format(TxtQ.Text * (1 + Etc(Abs(deltaT)) / 100), "0.0000") & "]"
TxtQ1.Text = Format(Val(TxtQ.Text) / 3.6, "0.0000")
TxtDeltaQ1.Text = "±" & Format(TxtQ1.Text * Etc(Abs(deltaT)) / 100, "0.0000")
TxtQ3.Text = "[" & Format(TxtQ1.Text * (1 - Etc(Abs(deltaT)) / 100), "0.0000") & "~" _
& Format(TxtQ1.Text * (1 + Etc(Abs(deltaT)) / 100), "0.0000") & "]"
TxtWencha.Text = Format(deltaT, "0.000")
TxtDeltaT.Text = "±" & Format(Abs(deltaT) * Etc(Abs(deltaT)) / 100, "0.0000")
TxtWencha1.Text = "[" & Format(Val(deltaT) * (1 - Etc(Abs(deltaT)) / 100), "0.000") & "~" _
& Format(Val(deltaT) * (1 + Etc(Abs(deltaT)) / 100), "0.000") & "]"
TxtJSMidu.Text = Format(Midu(t1), "0.000")
TxtHSMidu.Text = Format(Midu(t2), "0.000")
TxtM.Text = Format(Val(TxtJSMidu.Text) * Val(TxtLiuLiang.Text), "0.0000")
TxtJSHanzhi.Text = Format(Hanzhi(t1), "0.0000")
TxtHSHanzhi.Text = Format(Hanzhi(t2), "0.0000")
TxtHanCha.Text = Format(Val(TxtJSHanzhi.Text) - Val(TxtHSHanzhi.Text), "0.0000")
End Sub 展开
展开全部
Private Sub CanshuCal(t1 As Single, t2 As Single) 子过程函数
Dim deltaT As Single 定义一个单精度的变量
deltaT = t1 - t2
TxtEtc2.Text = "±" & Format(Etc(Abs(deltaT)), "0.000") & "%" 文本框TxtEtc2.text属性显示“±”+ Etc(deltaT变量的绝对值),显示格式为“0.000”(也就是三位小数) +“%”,Etc应该是你定义的函数
TxtQ.Text = Format(ReLiang(TxtLiuLiang.Text, t1, t2), "0.0000") TxTQ的text属性显示格式为四位小数的,ReLiang是自定义的函数,你找找是不是有这个函数
TxtDeltaQ.Text = "±" & Format(TxtQ.Text * Etc(Abs(deltaT)) / 100, "0.0000")
TxtQ2.Text = "[" & Format(TxtQ.Text * (1 - Etc(Abs(deltaT)) / 100), "0.0000") & "~" _
& Format(TxtQ.Text * (1 + Etc(Abs(deltaT)) / 100), "0.0000") & "]"
TxtQ1.Text = Format(Val(TxtQ.Text) / 3.6, "0.0000")
TxtDeltaQ1.Text = "±" & Format(TxtQ1.Text * Etc(Abs(deltaT)) / 100, "0.0000")
TxtQ3.Text = "[" & Format(TxtQ1.Text * (1 - Etc(Abs(deltaT)) / 100), "0.0000") & "~" _
& Format(TxtQ1.Text * (1 + Etc(Abs(deltaT)) / 100), "0.0000") & "]"
TxtWencha.Text = Format(deltaT, "0.000")
TxtDeltaT.Text = "±" & Format(Abs(deltaT) * Etc(Abs(deltaT)) / 100, "0.0000")
TxtWencha1.Text = "[" & Format(Val(deltaT) * (1 - Etc(Abs(deltaT)) / 100), "0.000") & "~" _
& Format(Val(deltaT) * (1 + Etc(Abs(deltaT)) / 100), "0.000") & "]"
TxtJSMidu.Text = Format(Midu(t1), "0.000")
TxtHSMidu.Text = Format(Midu(t2), "0.000")
TxtM.Text = Format(Val(TxtJSMidu.Text) * Val(TxtLiuLiang.Text), "0.0000")
TxtJSHanzhi.Text = Format(Hanzhi(t1), "0.0000")
TxtHSHanzhi.Text = Format(Hanzhi(t2), "0.0000")
TxtHanCha.Text = Format(Val(TxtJSHanzhi.Text) - Val(TxtHSHanzhi.Text), "0.0000")
End Sub
其中很多只是带有函数名,无法一一解释。其中xtEtc2、 TxtQ、TxtLiuLiang、TxtDeltaQ、TxtQ2、TxtQ1、TxtHSMidu、TxtHanCha、TxtJSHanzhi等应该是文本框的name属性,Etc、ReLiang、Midu应该是你定义的函数,或者是Vb自带的函数,我具体没有找到什么作用
Dim deltaT As Single 定义一个单精度的变量
deltaT = t1 - t2
TxtEtc2.Text = "±" & Format(Etc(Abs(deltaT)), "0.000") & "%" 文本框TxtEtc2.text属性显示“±”+ Etc(deltaT变量的绝对值),显示格式为“0.000”(也就是三位小数) +“%”,Etc应该是你定义的函数
TxtQ.Text = Format(ReLiang(TxtLiuLiang.Text, t1, t2), "0.0000") TxTQ的text属性显示格式为四位小数的,ReLiang是自定义的函数,你找找是不是有这个函数
TxtDeltaQ.Text = "±" & Format(TxtQ.Text * Etc(Abs(deltaT)) / 100, "0.0000")
TxtQ2.Text = "[" & Format(TxtQ.Text * (1 - Etc(Abs(deltaT)) / 100), "0.0000") & "~" _
& Format(TxtQ.Text * (1 + Etc(Abs(deltaT)) / 100), "0.0000") & "]"
TxtQ1.Text = Format(Val(TxtQ.Text) / 3.6, "0.0000")
TxtDeltaQ1.Text = "±" & Format(TxtQ1.Text * Etc(Abs(deltaT)) / 100, "0.0000")
TxtQ3.Text = "[" & Format(TxtQ1.Text * (1 - Etc(Abs(deltaT)) / 100), "0.0000") & "~" _
& Format(TxtQ1.Text * (1 + Etc(Abs(deltaT)) / 100), "0.0000") & "]"
TxtWencha.Text = Format(deltaT, "0.000")
TxtDeltaT.Text = "±" & Format(Abs(deltaT) * Etc(Abs(deltaT)) / 100, "0.0000")
TxtWencha1.Text = "[" & Format(Val(deltaT) * (1 - Etc(Abs(deltaT)) / 100), "0.000") & "~" _
& Format(Val(deltaT) * (1 + Etc(Abs(deltaT)) / 100), "0.000") & "]"
TxtJSMidu.Text = Format(Midu(t1), "0.000")
TxtHSMidu.Text = Format(Midu(t2), "0.000")
TxtM.Text = Format(Val(TxtJSMidu.Text) * Val(TxtLiuLiang.Text), "0.0000")
TxtJSHanzhi.Text = Format(Hanzhi(t1), "0.0000")
TxtHSHanzhi.Text = Format(Hanzhi(t2), "0.0000")
TxtHanCha.Text = Format(Val(TxtJSHanzhi.Text) - Val(TxtHSHanzhi.Text), "0.0000")
End Sub
其中很多只是带有函数名,无法一一解释。其中xtEtc2、 TxtQ、TxtLiuLiang、TxtDeltaQ、TxtQ2、TxtQ1、TxtHSMidu、TxtHanCha、TxtJSHanzhi等应该是文本框的name属性,Etc、ReLiang、Midu应该是你定义的函数,或者是Vb自带的函数,我具体没有找到什么作用
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询