请回答菜鸟级的问题

来源:百度知道 编辑:UC知道 时间:2024/06/23 03:40:10
Private Sub Command1_Click()
Dim a, b, c, e, f
Open "D:\TL\BG\90-2.txt" For Input As #1
Open "D:\TL\BG\90-3.txt" For Output As #2
Line Input #1, a
Print #2, a
Do While Not EOF(1)
Line Input #1, b
If Len(b) = 22 Then Print #2, b
If Len(b) = 22 Then c = Mid(b, 21, 1)
If Mid(b, 37, 2) <> " " Then d = Mid(b, 36, 2)
If Mid(b, 47, 2) = "PG" Then
ElseIf Mid(b, 54, 2) - c = 0 Then e = Mid(b, 57, 5)
If Mid(b, 54, 2) - c = 1 Then e = Mid(b, 57, 5) + 60
If Mid(b, 54, 2) - c = 2 Then e = Mid(b, 57, 5) + 180
If Mid(b, 54, 2) - c < 0 Then e = Mid(b, 57, 5) + 60
If Mid(b, 47, 2) = "SG" Then
ElseIf Mid(b, 54, 2) - c = 0 Then f = Mid(b, 57, 5)
If Mid(b, 54, 2) - c = 1 Then f = Mid(b, 57, 5) + 60
If Mid(b, 54, 2) - c = 2 Then f = Mid(b, 57, 5) + 180
If Mid(b, 54, 2) - c < 0 Then f = Mid(b, 57, 5) + 60
Print #2, Mid(

Private Sub Form_Load()
Dim a, b
Open "D:\TL\BG\90-2.txt" For Input As #1
Open "D:\TL\BG\90-3.txt" For Output As #2
Line Input #1, a
Print #2, a
Do While Not EOF(1)
Line Input #1, b
Loop
If Len(b) = 22 Then Print #2, b
If Len(b) = 22 Then c = Mid(b, 21, 1)
If Mid(b, 37, 2) <> " " Then d = Mid(b, 36, 2)
If Mid(b, 47, 2) = "PG" Then
If Mid(b, 54, 2) - c = 0 Then e = Mid(b, 57, 5)
If Mid(b, 54, 2) - c = 1 Then e = Mid(b, 57, 5) + 60
If Mid(b, 54, 2) - c = 2 Then e = Mid(b, 57, 5) + 180
If Mid(b, 54, 2) - c < 0 Then e = Mid(b, 57, 5) + 60
If Mid(b, 47, 2) = "SG" Then
If Mid(b, 54, 2) - c = 0 Then f = Mid(b, 57, 5)
If Mid(b, 54, 2) - c = 1 Then f = Mid(b, 57, 5) + 60
If Mid(b, 54, 2) - c = 2 Then f = Mid(b, 57, 5) + 180
If Mid(b, 54, 2) - c < 0 Then f = Mid(b, 57, 5) + 60
P