Dim intArray() As Integer
創(chuàng)新互聯(lián)建站是專業(yè)的寧國(guó)網(wǎng)站建設(shè)公司,寧國(guó)接單;提供網(wǎng)站制作、網(wǎng)站設(shè)計(jì),網(wǎng)頁(yè)設(shè)計(jì),網(wǎng)站設(shè)計(jì),建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行寧國(guó)網(wǎng)站開(kāi)發(fā)網(wǎng)頁(yè)制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛(ài)的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊(duì),希望更多企業(yè)前來(lái)合作!
- Or -
Dim intArray() As Integer = New Integer() { 0 }
- Or -
Dim intArray As Integer()
- Or -
Dim intArray As Integer() = New Integer() { 0 }
- Or -
Dim intArray(10) As Integer
用一個(gè)帶括號(hào)的變量名來(lái)定義一維數(shù)組和多維數(shù)組如dim a(5) as integer '定義了1個(gè)1維、6個(gè)元素?cái)?shù)組dim a(5,5) as integer '定義了1個(gè)2維、36個(gè)元素的數(shù)組
先遍歷數(shù)組:
for?i?=?0?to?Ubound(數(shù)組)
...
next
再把中間的...替換成:
if?數(shù)組(i)?=?特定的字符?then?msgbox?"找到鳥(niǎo),當(dāng)前是:數(shù)組"??i