Bagikan melalui


VBScript Features

The following table is a list of Microsoft Visual Basic Scripting Edition (VBScript) features.

Features by Category

Category

Keywords

Array handling

Array, Dim, EraseIsArrayLBound, Private, Public, ReDim, UBound

Assignments

Set

Comments

Comments using ' or Rem

Constants/Literals

Empty, False, NothingNullTrue

Control flow

Do...Loop, For...NextFor Each...NextIf...Then...ElseSelect CaseWhile...WendWith

Conversions

Abs, Asc, AscB, AscWCBool, CByte, CCur, CDate, CDbl, Chr, ChrB, ChrW, CInt, CLng, CSng, CStr, DateSerial, DateValue, Fix, Hex, Int, Oct, SgnTimeSerial, TimeValue

Dates/Times

Date, DateAdd, DateDiff, DatePart, DateSerial, DateValue, Day, Hour, Minute, Month, MonthName, Now, Second, Time, TimeSerial, TimeValueWeekday, WeekdayName, Year

Declarations

Class, ConstDim, Function, Private, Property Get, Property Let, Property Set, Public, ReDim, Sub

Error Handling

Err, On Error

Expressions

Eval, ExecuteRegExpReplaceTest

Formatting Strings

FormatCurrency, FormatDateTimeFormatNumberFormatPercent

Input/Output

InputBox, LoadPictureMsgBox

Literals

Empty, FalseNothingNullTrue

Math

Atn, Cos, Exp, Log, Randomize, Rnd, Sin, Sqr, Tan

Miscellaneous

Eval Function, Execute StatementRGB Function

Objects

CreateObject, Err ObjectGetObjectRegExp

Operators

Addition (+), And, Division (/), Equality (=), Eqv, Exponentiation (^)Greater Than (>)Greater Than or Equal To (>=)Imp, Inequality (<>), Integer Division (\)IsLess Than (<), Less Than or Equal To (<=), Modulus arithmetic (Mod)Multiplication (*), Negation (-)Or, String concatenation (&)Subtraction (-), Xor

Options

Option Explicit

Procedures

Call, Function, Property Get, Property Let, Property Set, Sub

Rounding

Abs, Fix, Int, Round, Sgn

Script Engine ID

ScriptEngine, ScriptEngineBuildVersionScriptEngineMajorVersionScriptEngineMinorVersion

Strings

Asc, AscB, AscW, Chr, ChrB, ChrW, Filter, InStr, InStrB, InStrRevJoinLCase, Len, LenB, Left, LeftB, LTrim, Mid, MidB, ReplaceRight, RightB, RTrim, SpaceSplitStrCompStringStrReverseTrim, UCase

Variants

IsArray, IsDateIsEmptyIsNullIsNumericIsObjectTypeNameVarType