我编的下面的程序有什么问题?
注意:12.2356表示12度23分56秒(加减法)
Private Sub Cmd1-Click()
Dim T1,T2 as sTring
Dim T11 , T12 , T13 , T21 , T22 , T23 as Int
T1=TexT1.TexT
T2=TexT2.TexT
T13 = Val ( Right ( T1 , 2 ) )
T12 = Val ( Left ( Right (T1 , 4 ) , 2 ))
T11 = Fix ( val ( T1 ) )
T23 = Val ( Right ( T2 , 2 ) )
T22= Val ( Left ( Right ( T2 , 4 ) , 2 ) )
T21 = Fix ( Val ( T2 ) )
If ( T11 >= 0 and T21 >= 0 ) and ( T11<0 and T21<0 ) Then
If T13 + T23 >= 60 Then
m = T13 + T23 – 60
f = T12 + T22 + 1
if f >= 60 Then
f = f - 60
d = T11 + T21 + 1
if d >=360 Then
d = d - 360
End if
Else
d = T11 + T21
if d >= 360 Then
d = d - 360
End if
End if
Else
M = T13 + T23
f =T12 + T22
if f >=60 Then
f = f - 60
d = T11 +T21 + 1
Else
D =T11 + T21
if d >=360 Then
d = d - 360
End if
End if
End if
Elseif T11 >=0 and T21 < 0 Then
if T13 > T23 Then
m = T13 - T23
if T12 > T22 Then
f = T12 - T22
d = T11 + T21
Else
f = T12 + 60 - T22
d = T11 + T2 1- 1
End if
Else
m = T13 + 60 - T23
f = T12 - T22 - 1
if T12 < T22 + 1 Then
f = T12 + 60 - T22 - 1
d = T11 + T21 - 1
End if
End if
Elseif T11 < 0 and T 21>= 0 Then
if T23 > T13 Then
m = T23 - T13
if T22 > T12 Then
f = T22 - T12
d = T21 + T11
Else
F = T22 + 60 - T12
d = T21 + T11 - 1
End if
Else
m = T23 + 60 - T13
f = T22 - T12 - 1
if T22 < T12 + 1 Then
f = T22 + 60 - T12 - 1
d = T21 + T11 - 1
End if
End if
Else
msgbox “输入的是什么?”
End if
text3.text=str(d)+str(f)+str(m) ------此处运行时出错,可能有问题,但又不知错在哪
End Sub
解决这种角度计算,不知可有什么好方法?高手请指点
本人只会一点VB,谢谢了