首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

关于中置变量的有关问题

2012-01-13 
关于中置变量的问题x125x2 ABC fori1to2str5x +cstr(i)debug.pringstr5str5想要印出25与 ABC ne

关于中置变量的问题
x1=25
x2= "ABC "
for   i   =   1   to   2
        str5   =   "x "   +   cstr(i)
        debug.pring   str5     'str5   想要印出   25与 "ABC "  
next  


[解决办法]
那就用集合
dim x as collection
set x = new collection
x.add 24, "x1 "
x.add "ABC ", "x2 "
for i=1 to x.count
debug.print x(i)
next

或者
debug.print x( "x1 ")
debug.print x( "x2 ")
[解决办法]
如果你是这个意思,那么超过两个时可以用 Choose()

热点排行