Dim s As String
Dim filename As String
filename = shuxiang & xingzuo & ".txt"
Open filename For Input As #1
Do While Not EOF(1)
Line Input #1, 拍搜氏s
Print s
Loop
Close #1
追加写文件
Dim i As Integer, n As Integer, a(6) 漏谨As Integer
n = 6
Open "D:\1122.txt" For Append As #1
Randomize
For i = 1 To n
a(i) = Int(Rnd * 1000 + 1)
Print #1, a(i)
Next i
Close #1
覆盖写文件
Dim i As Integer, n As Integer, a(6) As Integer
n = 6
Open "D:\1122.txt" 袭散For output As #1
Randomize
For i = 1 To n
a(i) = Int(Rnd * 1000 + 1)
Print #1, a(i)
Next i
Close #1
读文件Dim s As String
Dim filename As String
filename = shuxiang & xingzuo & ".txt"
Open filename For Input As #1
Do While Not EOF(1)
Line Input #1, 拍搜氏s
Print s
Loop
Close #1
追加写文件
Dim i As Integer, n As Integer, a(6) 漏谨As Integer
n = 6
Open "D:\1122.txt" For Append As #1
Randomize
For i = 1 To n
a(i) = Int(Rnd * 1000 + 1)
Print #1, a(i)
Next i
Close #1
覆盖写文件
Dim i As Integer, n As Integer, a(6) As Integer
n = 6
Open "D:\1122.txt" 袭散For output As #1
Randomize
For i = 1 To n
a(i) = Int(Rnd * 1000 + 1)
Print #1, a(i)
Next i
Close #1
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)