LOTUSSCRIPT 言語


例:Select Case ステートメント
' One of five Print statements is selected for execution,
' depending on the value of the variable segSelect.
' Note that the Case Else clause is executed only if
' segSelect is less than 0, between 0 and 1, between 1 and 2,
' between 2 and 3, or between 5 and 6.

Dim segSelect As Double
' ...
For segSelect# = -1 to 7
Select Case segSelect#
Case 0 :Print "0"
Case 1, 2 :Print "1, 2"
Case 3 To 5 :Print "3 TO 5"
Case Is >= 6 :Print ">=6"
Case Else :Print "Else"
End Select
Next
' Output:
' Else
' 0
' 1, 2
' 1, 2
' 3 TO 5
' 3 TO 5
' 3 TO 5
' >=6
' >=6

関連項目