📄 case.bas
字号:
'-----------------------------------------------------
' (c) 1998-2000 MCS Electronics
' CASE.BAS demonstrates SELECT CASE statement
'-----------------------------------------------------
Dim I As Byte 'dim variable
Dim S As String * 5 , Z As String * 5
Do
Input "Enter value (0-255) " , I
Select Case I
Case 1 : Print "1"
Case 2 : Print "2"
Case 10 To 20 : Print "10-20"
Case Is >= 30 : Print ">= 30"
Case Else : Print "Not in Case statement"
End Select
Loop
End
'note that a Boolean expression like > 3 must be preceded
'by the IS keyword
'also note that now only one expression can be tested in one CASE
'so CASE 1,2,3 or CASE 1 TO 3 is not supported now
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -