随机文件写入与读取的问题?
程序代码:
Private Type stu id As Integer Name As String * 20 End Type Dim stu1 As stu Dim Number As Integer Private Sub Command1_Click() Open App.Path + "\MyRand1.txt" For Random As #1 Len = Len(stu1) For Number = 1 To 5 stu1.id = Number stu1.Name = "My Name" & Number Put #1, Number, stu1 Next Number Close #1 End Sub Private Sub Command2_Click() Open App.Path + "\MyRand2.txt" For Random As #2 Len = Len(stu1) For Number = 6 To 10 stu1.id = Number stu1.Name = "My Name" & Number Put #2, Number, stu1 Next Number Close #2 End Sub请问这两个文件中的美容怎么差别这么大啊下面是这两个文件的内容:
MyRand1.txt
祍丠浡ㅥ††††††祍丠浡㉥††††††祍丠浡㍥††††††祍丠浡㑥††††††祍丠浡㕥††††††
MyRand2.txt
My Name6 My Name7 My Name8 My Name9
My Name10
求解,两个文件内容合并后文件的内容怎么是对的
MyRand3.txt
My Name1 My Name2 My Name3 My Name4 My Name5 My Name6 My Name7 My Name8 My Name9
My Name10