请大家帮我看看这段小程序错在哪?在线等!

gymxyl 2004-08-31 09:35:29
<%
dim fso,f,g,w,qq(139,45),zz(139,45),zz0(7),zz1(7), DeltZ(7)
For i=1 to 7
zz0(i)=0
Next
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("f:\xyl\q.txt", 1)
set g = fso.OpenTextFile("f:\xyl\z.txt", 1)
For i=1 to 139
w=f.readline
aa=split(w,",")
for j=0 to ubound(aa)
qq(i,j)=csng(aa(j))
Next
w=g.readline
aa=split(w,",")
For j=0 to ubound(aa)
zz(i,j)=csng(aa(j))
Next

For k=1 to nNode
id=GMT(k,1)
if k=en(id) then
zz1(k)=zz(i,ec(id))
else
zz1(k)=zz(i,sc(id))
end if
if i=1 then
DeltZ(k)=0.0:zz0(k)=zz1(k)
else
DeltZ(k)=zz1(k)-zz0(k)
Response.Write zz1(k)&Chr(13)&Chr(10)
Next
Next
%>

其中GMT(,)ec(),sc()都是已知的。
一运行总说错误的“next”,这是怎么回事?
...全文
56 点赞 收藏 7
写回复
7 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
zorou_fatal 2004-09-01
呵呵,GMT里的形参都什么类型的?
回复
gymxyl 2004-09-01
GMT不是函数,一个二维数组。
回复
mjpclab 2004-09-01
这要看你的GMT函数的参数怎么用了
回复
gymxyl 2004-08-31
还请大家帮我看看这个问题!谢谢了,很急!
回复
gymxyl 2004-08-31
怎么又说“GMT”类型不匹配?
回复
zorou_fatal 2004-08-31
<%

dim fso,f,g,w,qq(139,45),zz(139,45),zz0(7),zz1(7), DeltZ(7)
For i=1 to 7

zz0(i)=0

Next

Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("f:\xyl\q.txt", 1)
set g = fso.OpenTextFile("f:\xyl\z.txt", 1)

For i=1 to 139

w=f.readline
aa=split(w,",")

for j=0 to ubound(aa)
qq(i,j)=csng(aa(j))
Next

w=g.readline
aa=split(w,",")

For j=0 to ubound(aa)
zz(i,j)=csng(aa(j))
Next

For k=1 to nNode

id=GMT(k,1)

if k=en(id) then
zz1(k)=zz(i,ec(id))
else
zz1(k)=zz(i,sc(id))
end if

if i=1 then
DeltZ(k)=0.0:zz0(k)=zz1(k)
else
DeltZ(k)=zz1(k)-zz0(k)
Response.Write zz1(k)&Chr(13)&Chr(10)
end if '<-----------这里少了个end if

Next
Next
%>
回复
zorou_fatal 2004-08-31
<%

dim fso,f,g,w,qq(139,45),zz(139,45),zz0(7),zz1(7), DeltZ(7)
For i=1 to 7

zz0(i)=0

Next

Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("f:\xyl\q.txt", 1)
set g = fso.OpenTextFile("f:\xyl\z.txt", 1)

For i=1 to 139

w=f.readline
aa=split(w,",")

for j=0 to ubound(aa)
qq(i,j)=csng(aa(j))
Next

w=g.readline
aa=split(w,",")

For j=0 to ubound(aa)
zz(i,j)=csng(aa(j))
Next

For k=1 to nNode

id=GMT(k,1)

if k=en(id) then
zz1(k)=zz(i,ec(id))
else
zz1(k)=zz(i,sc(id))
end if

if i=1 then
DeltZ(k)=0.0:zz0(k)=zz1(k)
else
DeltZ(k)=zz1(k)-zz0(k)
Response.Write zz1(k)&Chr(13)&Chr(10)
end if

Next
Next
%>
回复
相关推荐
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2004-08-31 09:35
社区公告
暂无公告