VB腳本的邏輯

//select

SELECT CASE Visitor_Name
CASE “Bill Gates”
 Greeting=”Welcome Bill Gates!”
CASE “President Clinton”
 Greeting=”Welcome President Clinton!”
CASE ELSE
 Greeting=”Welcome Someone!”
END SELECT

//for
for i=1 to 500
  next
For i=500 to 1 step –1
  NEXT
for i=1 to 500 step 10
  next

dim myarray(10)
myarray(4)=”Running Shoes”
for i=0 to ubound(myarray)
  if myarray(i)=”Running Shoes” then exit for
next

dim myarray(10)
myarray(4)=”Running Shoes”
for each i in myarray
 if i=”Running Shoes” then exit for
next


//while

TheFuture=DATEADD(“s”,15,TIME)
WHILE TIME<TheFuture
WEND

do while sentence<>”Hello There!”
loop

do until
loop

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章