下表摘要支援的 BSL 類別及其相關關鍵字。
表格 11-1 BSL:類別與關鍵字
| 類別 | 關鍵字 |
|---|---|
| 陣列處理 | Array、Dim、Private、Public、ReDim、IsArray、Erase、LBound、UBound |
| 指派 | Sets |
| 註解 | 使用單引號的註解 (') |
| 常數與文字 | Empty、Nothing、Null、True、False |
| 控制流程 | Do…Loop、For…Next、For Each…Next、If…Then…Else…End If、Select Case、While…Wend、With…End With |
| 轉換 | Abs、Asc、Chr、CBool、CByte、CDate、CDbl、CInt、CLng、CStr、DateSerial、Fix、Int、Sgn |
| 日期和時間 | Date、Time、DateAdd、DateDiff、DatePart、DateSerial、Day、Month、Year、Hour、Minute、Second、Now、MonthName |
| 宣告 | Const、Dim、Private、Public、ReDim、Function、Sub、Class |
| 錯誤處理 | On Error、Err |
| 表示式 | |
| 格式化字串 | FormatDateTime、FormatNumber |
| 文字 | Empty、False、Nothing、Null、True |
| 數學 | Sqr、Rnd |
| 物件 | CreateObject、Err Object、RegExp、ArrayList、Dictionary、ADODB.Connection、ADODB.RecordSet、File Stream、File Object、Text Stream、WShell |
| 運算子 | 加法 (+)、減法 (-)、指數 (^)、模數算術 (Mod)、乘法 (*)、除法 (/)、整數除法 (\)、否定 (-)、字串串接 (&)、等於 (=)、不等於 (<>)、小於 (<)、小於或等於 (<=)、大於 (>)、大於或等於 (>=)、And、Or、Xor |
| 選項 | Option Explicit |
| 程序 | Call、Function、Sub |
| 捨入 | Abs、Int、Fix、Round |
| 字串 | Asc、Chr、Filter、InStr、InStrRev、Join、Len、LCase、UCase、Left、Mid、Right、Replace、Space、Split、StrComp、String、StrReverse、LTrim、RTrim、Trim |
| 變異 | IsArray、IsDate、IsEmpty、IsNull、IsNumeric |