几道有关VB程序的题目,希望高手解答

来源:百度知道 编辑:UC知道 时间:2024/06/01 22:17:46
程序改错
1,数组赋值
Dim a() As Variant
Dim b(4) As Integer
a=Array(4,7,2,1,8,10)
b=a

2,下列应该从1到10进行循环
Dim m as Integer
Dim Tot as Integer
m=0
Do
Tot=Tot+m
m=m+1
Loop While x<10

判断程序运行结果
1,MyPos等于多少
Dim SearchString,SearchChar,MyPos1,MyPos2
SearchString="In our experiment,the number of Nodes quickly vary"
SearchChar="UMB"
MyPos1=Instr(4,SearchSting,SearchChar,1)
SearchChar="n"
MyPos2=Instr(1,SearchString,SearchChar,0)
答案:

2,FirstWord,LastWord,MidWords是什么
Dim MyString,FirstWord,LastWord,MidWords
MyString="Server is the only source of streaming packets in the system"
FirstWord=Mid(MyString,1,5)
LastWord =Mid(MyString,14,4)
MidWords=Mid(MyString,10)
答案:

3,MyStr1,MyStr2,MyStr3是什么
Dim AnyString,MyStr1,MyStr2,MyStr3
AnyString="We simulate both the mode

不知道怎么说你 用VB做一次就知道答案了 如果你用VB做一次都不做干脆别做了

2.
FirstWord=erver
LastWord =only
MidWords=the only source of streaming packets in the system

3.
MyStr1=W
MyStr2=We simulate
MyStr3=We simulate both the

5.
a(0)=2008
a(1)=6
a(2)=5
SPLIT()这个函数是将text1按照“-”为分隔符分开,有两个分隔符,就是将2008-6-5分开三个字符串了 ,
呵呵这个函数刚刚今个星期血的,SPLIT 不单止可以按“-”这个分,还可以定义其他符号,例如空格,*,&,^,$,#,@,!等等这些都可以

6.
12345 + "1000" 结果为:123451000或者错误
1000 & 4789 结果为:5789
"1234" + 7890 结果为:12347890或者错误
"abcd" & 12345 结果为:abcd12345
"1000" + 123 & 100 结果为:

NO