主题:[讨论]请高手指点 数组排序
我编了一个程序,读入txt文件中的内容并在text中输出,若内容为数字,则将数字存入数组a(n)中
以供排序,运行时报错"loop缺少do",是什么原因呢
Dim a(100) As Variant
Dim str As Variant
dim n as integer
n=0
Do While Not EOF(1)
Input #1, str
Text1 = Text1 & str & Space(2)
If IsNumeric(str) Then
n = n + 1
a(n) = str
Loop
Close #1
以供排序,运行时报错"loop缺少do",是什么原因呢
Dim a(100) As Variant
Dim str As Variant
dim n as integer
n=0
Do While Not EOF(1)
Input #1, str
Text1 = Text1 & str & Space(2)
If IsNumeric(str) Then
n = n + 1
a(n) = str
Loop
Close #1