标题:[求助] 数组为何没有被赋值
取消只看楼主
lsdqwer
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2006-5-10
 问题点数:0 回复次数:0 
[求助] 数组为何没有被赋值

我编写了这样一个程序,为什么数组的值在输入后仍然为零?请教一下高手!

Dim ND(20), T(20) As Double

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Label3.Caption = Label3.Caption + vbLf + Text1.Text
Text1.Text = ""
i = i + 1
ND(i) = Val(Text1.Text)
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Label4.Caption = Label4.Caption + vbLf + Text2.Text
Text2.Text = ""
j = j + 1
ND(j) = Text2.Text
End If


End Sub

搜索更多相关主题的帖子: 赋值 
2006-06-03 14:52



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-69524-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.438553 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved