domain .tw idv.tw .com.tw
你正在閱覽 :: 繁體中文:: 學習 ASP SQL VB HTML code

學習 .ASP SQL HTML XML CSS JAVA Perl code study
English Chinese_Traditional Chinese_Simplified

你正在閱覽 :: 繁體中文 Chinese_Traditional

學習.主題:
首頁
ASP
CSS
Ecommerce
HTML
InternetProtocol
JAVA
Microsoft
Robots
SearchEngine
SQL
SQLserver
VBscript
. Array
»Filter
»Split
»UBound
. Functions
. Prevent_hacker
XML

SiteMap

3w....學習.教學 > VBSCRIPT > array » ubound

3w learning

array >
ubound

Title:

UBound(array name[,the largest dimension of the array])


UBound 讀取指訂的陣列中最大的註標
Description:

UBound(arrayX) returns the largest dimension size


UBound 陣列的極大( Up Bound)
LBound 陣列的極小(Low Bound)
Example Code:

Example 1----------- <% arrayX=Array("link","ezer","com") for I=0 to UBound(arrayX) if I<UBound(arrayX) then response.write arrayX(I)&"." else response.write arrayX(I) end if next %> Example 2 ------------------- <% dim dayArray(99) dayArray(0)="8/5/2006" dayArray(1)="9/5/2006" dayArray(2)="10/5/2006" dayArray(3)="11/5/2006" dayArray(4)="12/5/2006" '-----------Use document.write( )------------------------- document.write(UBound(dayArray)) document.write("<br>") document.write(LBound(dayArray)) '-----------Use response.write ----------------------- response.write UBound(dayArray)&"<br>"&LBound(dayArray) %>


當 array 未被設限大小時, UBound array 
值將跟著 array 值的增加而變更
Example Result:

Example 1 result: link.ezer.com Example 2 result: 99 0


------- attention ---------- Example1 has no dim arrayX=(2) so the UBound(arrayX) can be different when array change Example2 has dim dayArray(99) already so the array max =99


..
...
...

[ 11/20/2008 ]

www learning school add more scripts and tips memo
You are at >>3WT.EZER.COM >> 3WT.EZER.COM/VBSCRIPT/ARRAY/UBOUND.ASP>>VBSCRIPT
Helpful link:: SEO web tools :: Live PR | SERP checker
back to top Ezer code adding :: Questions ;email